omarfilip
By:
omarfilip

Add temporary SFTP user restricted to /var/www/html

May 3, 2017 201 views
Apache Ubuntu 16.04

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!

2 Answers

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!

WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. WordPress has seen incredible adoption and is a great choice for getting a website up and...

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

chrootlocaluser=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.

by Etel Sverdlov
Vsftpd is a fast and secure FTP server. Installing an FTP server can assist you with uploading files to your droplet. This tutorial describes how to install and set up vsftpd on Ubuntu 12.04.
Have another answer? Share your knowledge.