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.
[email protected]anduser\@domain.tldas a file name.