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/mysite.com
I used that method: usermod --home /var/www/mysite.com/public_html tchuck
buy when I login with ftp, i can get back to parent directories. I just want this user, to see only mysite.com/ as a parent.
How can I make it?
Thanks
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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:
https://www.cyberciti.biz/tips/vsftp-chroot-users-limit-to-only-their-home-directory.html
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.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.