By omarfilip
Hello,
I need to add an SFTP user to a droplet with Apache with access to the /var/www/html directory only.
On this droplet password authentication is disabled and the ufw firewall is active.
The goal is to give temporary access to a WordPress plugin developer for troubleshooting and later revoke their access — all without reducing the security of the server.
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!
Dear @omarfilip I think, you might visit this page: How To Install WordPress with LAMP on Ubuntu 16.04.
It can maybe useful for you.
Thank you!
Install and configure VSFTP given as per given at below link.
https://www.digitalocean.com/community/tutorials/how-to-set-up-vsftpd-on-ubuntu-12-04
As you want to give access to a particular directory, please find the below step after installation of VSFTP.
By changing User’s Home directory
Make sure following line exists /etc/vsftp/vsftpd.conf
chroot_local_user=YES
Set User HOME Directory to /var/www/html, if you want to change for existing user then you can use :
usermod --home /var/www/ username
then set required permission on /var/www/html
Kindly follow the above step and do let me know in case of any query.
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.