I am attempting to setup VSFTPD with virtual users on a server running Ubuntu 12.04. I have configured the server to allow for virtual users to login, but I am having trouble getting it to allow uploads. My vsftpd.conf is as follows:
listen=YES anonymous_enable=NO local_enable=YES write_enable=YES local_umask=022 anon_upload_enable=YES dirmessage_enable=YES use_localtime=YES xferlog_enable=YES connect_from_port_20=YES chroot_local_user=YES virtual_use_local_privs=YES guest_enable=YES guest_username=virtual user_sub_token=$USER local_root=/var/www/$USER hide_ids=YES secure_chroot_dir=/var/run/vsftpd/empty pam_service_name=vsftpd rsa_cert_file=/etc/ssl/private/vsftpd.pem
auth required pam_pwdfile.so pwdfile /etc/vsftpd.passwd crypt=hash account required pam_permit.so crypt=hash
I have two virtual users set up, one of which has the same name as a local user. They each have a directory in /var/www/ owned by 'virtual'. As I understand it, when a virtual user logs in this way they will appear to the system as the user virtual. Using this configuration user can log on, but cannot upload files. The error given in
Tue Nov 20 19:49:00 2012 [pid 2] CONNECT: Client "184.108.40.206" Tue Nov 20 19:49:07 2012 [pid 1] [zac] OK LOGIN: Client "220.127.116.11" Tue Nov 20 19:49:11 2012 [pid 2] CONNECT: Client "18.104.22.168" Tue Nov 20 19:49:11 2012 [pid 1] [zac] OK LOGIN: Client "22.214.171.124" Tue Nov 20 19:49:11 2012 [pid 3] [zac] FAIL CHMOD: Client "126.96.36.199", "/test.ppm 644"
I have tried changing the permissions of these directories in all sorts of ways, but nothing seem to work. I have a feeling that it is something simple related to permissions. Any ideas?