Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Fresh LAMP server setup with Ubuntu 12.04 and VSFTPD.

I'm trying to access the /var/www folder (web root) with FTP user.

I created a new user ftpuser and added it to the www-data user group created automatically by Apache.
Home directory of that user is set to /var/www. I also changed the ownership of the /var/www to www-data group and changed permissions to 02775.

However, I'm still not able to upload files. Error is: "553 Could not create file".

  1. Can someone please explain me how to set these permissions properly?
  2. What is the correct setup? Should I set the home directory of ftpuser to /var/www or somehow diffeerently?

I found a lot of topics on the web but none of them offer a universal solution.

Thank you!


Here is the output of ls -l of /var/www:

drwxr-sr-x 3 root ftpuser 4096

Content of vsftpd.conf file:

share|improve this question
I have the same problem, did you find out anything? – Martin May 12 '13 at 10:21
Unfortunately no - I gave up and started using git for pushing the code for all projects on that server. It is a dev/testing server only.. – Aram Boyajyan May 13 '13 at 8:39
Okay, thanks for your reply. – Martin May 13 '13 at 10:05
After some time, I ended up in the same situation on a new server, and Amin Y's answer was the right thing. Permissions were wrong and forcing them again on the folder fixed the issue. – Aram Boyajyan May 14 '14 at 14:10
up vote 11 down vote accepted

The problem is because your folder is owned by root, instead of ftpuser.

To fix it run:

sudo chown -R ftpuser:nogroup /var/www/ftuuserfolder
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.