Report this

What is the reason for this report?

Multiple domains and multiple SFTP or FTP accounts

Posted on March 26, 2014

I have managed to set up 2 domains on my account and have them both up and running, however how do I set SFTP or FTP access to those folders using user1@domain1.co.uk and user2@domain2.co.uk ?



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!

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.

I believe the way to do it would be to create 2 users on the remote system, set their home directories as the two respective folders and change the ownership on the contents of the folders to the correct user. <br> <br>Something like: <br> <br>1) useradd user1 -d /path/to/dir1 <br>2) useradd user2 -d /path/to/dir2 <br>3) passwd user1 <br>4) passwd user2 <br>5) chown -R user1 /path/to/dir1 <br>6) chown -R user2 /path/to/dir2 <br> <br>and then you can use sftp user1@host etc :)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.