3

I am using vsftp on Ubuntu 14.04 and have create a user using this command:

sudo adduser ftpuser --home /var/www/wp-content/uploads

The user has permission to see /var/www/wp-content/uploads but this user is also able to move up in the directory structure, so they can see content in /var/www and also in /var and /

The user can't edit these as they are not the owner of these files, which is good, but is there any way to stop the user from changing directory?

0
5

According to this answer, you need to edit /etc/vsftpd.conf and ensure the following line is there:

chroot_local_user=YES
1
  • thanks @chai-t-rex , i tried un-commenting chroot_local_user=YES but user can still move up in directories. so currently when user connects ftp he sees this directory path in ftp '/var/www/wp-content/uploads' but the path should be only this '/'.
    – Garry
    Nov 20 '17 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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