1

I've setup VSFTPD so when a user connects it'll use a user_config_dir search for that connected user and setup a chroot guest session (since there are multiple FTP accounts belonging to multiple users on the server). This works fine with user names that have no special characters. To avoid collisions on usernames I'm setting up each username with a postfix '@domain.tld' - however, the custom rules in user_config_dir don't load when the user has an @ symbol in the name. Is there a way around this in VSFTPD - or a setting that needs to be switched?

vsftpd.conf

listen=YES anonymous_enable=NO local_enable=YES guest_enable=YES write_enable=YES local_umask=022 dirmessage_enable=YES use_localtime=YES xferlog_enable=YES chroot_local_users=YES pam_service_name=scftp user_config_dir=/etc/vsftpd/virtual 

pam.d/scftp

auth required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login account required /lib/security/pam_userdb.so db=/etc/vsftpd/vsftpd_login 

vitrtual/usernamewithoutspecialchars

write_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES anon_upload_enable=YES local_root=/home/marco chroot_local_user=YES dirlist_enable=YES download_enable=YES guest_username=marco 

virtual/[email protected]

write_enable=YES anon_mkdir_write_enable=YES anon_other_write_enable=YES anon_upload_enable=YES local_root=/home/marco chroot_local_user=YES dirlist_enable=YES download_enable=YES guest_username=marco 

It really just seems it won't match the FTP user [email protected] to the proper virtual file - while usernamewithoutspecialchars works just fine.

4
  • have you tried with \@ (escape) Commented Apr 20, 2011 at 15:06
  • @MealstroM I have tried both [email protected] and user\@domain.tld as a file name. Commented Apr 20, 2011 at 16:17
  • hmm. try to put it in "" or '' Commented Apr 20, 2011 at 16:20
  • @MealstroM You realize this is a file name, right? I can log in - it authenticates just not respecting the rules in the file I've setup for virtual user rules. Commented Apr 20, 2011 at 16:26

2 Answers 2

0

Linux filesystems can quite happily manage @ in the name of a directory so the problem you are seeing most likely is with vsftpd. Have you tried using user.domain.tld in stead of [email protected]?

1
  • Using a . has worked just fine. I've seen other services use @domain.tld before but I suppose they were using PureFTPD or another alternative. Guess this lands in the bug report land Commented Apr 20, 2011 at 16:37
0

You should try to use SQL or RADIUS backend for auth logins and usernames should be stored as emails in sql db . That works, ive tested it.

1
  • But how do I store custom attributes for it - Again it's not the auth, I can authenticate, it's loading custom rules that doesn't work for logins with @ in it. Even if I move the auth to SQL won't I still have the same issue? Commented Apr 21, 2011 at 12:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.