Server Fault is a question and answer site for system and network administrators. 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

One of our dev boxes runs debian and VSFTPD, and I would like to allow a few select users to write to /var/www/testsite and its sub directories.

They can browse to /var/www via a symlink in their home directories, but they can't write. It doesn't matter if it's using FTP or SFTP.

Any ideas? I find this problem difficult to google.

share|improve this question
up vote 3 down vote accepted

What are your permissions on /var/www/ and /var/www/testsite/ ?

My suggestion is to give /var/www/testsite/ a group such as testsiteGroup, make sure /var/www/testsite has rw permissions for group and then add the users to group testsiteGroup.

chgrp -R testsiteGroup /var/www/testsite/ 
chmod g+w /var/www/testsite/ 
usermod -a -G testsiteGroup # this wil be done for each user, and the -a is critical 
                            # the -a appends group to users groups, without -a you will
                            # be replacing the users groups with the one listed 
share|improve this answer
Thanks, I have had some success with fiddling – Mathnode Oct 11 '10 at 13:00
No problem glad it worked. – Chris Oct 11 '10 at 13:10

If you use full authentication through SFTP (you should, for accounting) then vsftpd will use user's permissions to modify files.

Because of this there are two solutions:

  • add users to group under which the web server is running (usually www-data or www)
  • use ACLs and add default ACLs to directories in /var/www, this is much more fine-grained, but the partition needs to be mounted with acl flag

If you use anonymous access or FTP (which is by nature insecure), I'd strongly suggest going the second route.

share|improve this answer
thanks, that also did the trick :D – Mathnode Oct 11 '10 at 13:01

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.