Granting FTP access to one domain only on a droplet in var/www

Posted July 2, 2019 573 views
ApacheDigitalOceanDeploymentUbuntu 16.04

Hi everyone!

We have an ubuntu server with about ten different websites on it.

Login is by SSH keys.

I want now to create an SFTP user with access to one domain only.

Is there a tutorial on this? I thought it would be easy but it’s proving tricky!

Thanks for reading,

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

1 answer

Hello, there is a tutorial for this here:

This will disable SSH access and limit the logged in SFTP user to one directory, eg, the web root directory for your one website/domain.

Even with the tutorial, this is a challenging bit of setup so proceed with caution and don’t forget to backup your droplet in case you need to roll back.

Please let us know how it goes or if you have any questions about the tutorial and process.

Good luck!

by Mateusz Papiernik
SFTP stands for SSH File Transfer Protocol. As its name suggests, it's a secure way of transferring files to a server using an encrypted SSH connection. In a standard configuration, the SSH server grants file transfer access and terminal shell access to all users with an account on the system. In this tutorial, we'll set up the SSH daemon to limit SFTP access to one directory with no SSH access allowed on per user basis.
Submit an Answer