I'm faced with two issues right now. I cannot write to the /var/www/* folders and I am able to traverse backward into the /var and / root directory!

I'm using vsftpd and in the config I'm using the chroot_list and have added a local account. The account is apart of a group www-acc. I guess I should also mention the local_umask=022.

I tried to assign the group www-acc permissions to the directory /var/www/. I also changed the home directory for the user but it still seems they're able to browse the entire drive.

I'd like the user who has the group www-acc to only be allowed in /var/www/*. What can I do to successfully accomplish this?

ls -la for /var/www shows:

total 4
drwxr-sr-x.  4 root www-acc   49 Sep 21 14:16 .
drwxr-xr-x. 22 root root    4096 Sep 19 21:26 ..
drwxr-sr-x.  2 root www-acc    6 Jun 27 09:49 cgi-bin
drwxrwsr-x.  3 root www-acc   25 Sep 20 21:32 example.com
  • I fixed the inability to write to all folders within /var/www with: – Jay Sep 25 '18 at 15:26
  • sudo chown -R user:group /var/www sudo setfacl -R -d -m u:user:rwx,g:group:rwx,o::r /var/www – Jay Sep 25 '18 at 16:00

I fixed both issues. First I disabled a couple of options in the vsftpd.conf and then changed permissions on the directory again.


# (default follows)

Permissions were changed with:

sudo chown -R user:group /var/www 
sudo setfacl -R -d -m u:user:rwx,g:group:rwx,o::r /var/www

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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