Ubuntu – vsFTPd default uploaded file permissions on Ubuntu not working


I have a Server running Ubuntu 12.10 x64, and the last version of vsFTPd.

My user example.com has its home folder set on /var/www/example.com,

I created a public_html folder inside and gave 777 permisions to it, and removed the writing permissions of the home user folder. Everything is working well but:

Every file I upload by FTP (using SmartFTP) gets a chmod of 0.

My vsftpd.conf had only one line related:


I've tried to change to:


So my files would get 775 as soon as uploaded.

But only my uploaded folders are getting 775 permissions.

My uploaded files get 1411 permissions

Can someone help me solving that?

Best Answer

I ended up using


on the vsftpd.conf. The problem was that both FTP user and www-data user needed permissions to write, so i had to join www-data and ftpuser to www-data usergroup, and CHMOD -R 775 all the files on /var/www - that way, with 775 CHMOD, the group would have permission to read, write and execute. Now its working perfectly.