How to give permision to only one directory (vsftpd)

August 28, 2018 537 views
Server Optimization CentOS

I created new user:

adduser tchuck
passwd tchuck

(typed password)

and now; I want this user to see only one directory that; /var/www/public_html/

I used that method:
usermod –home /var/www/ tchuck

buy when I login with ftp, i can get back to parent directories.
I just want this user, to see only as a parent.

How can I make it?


2 Answers

Hey friend!

For this you would need a chroot environment. You’re probably going to want to move the website to the user’s home directory for this to work with any relative ease:

The complexity of achieving this in the most desirable way, without trade-offs, is not something I would underestimate. I mention that because having the site in the user’s home directory is probably going to present a few more challenges to your expected environment, and those might not be easily overcome with this model.


Have another answer? Share your knowledge.