Multiple domains and multiple SFTP or FTP accounts

Posted March 26, 2014 2.4k views
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 and ?

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.

Submit an Answer
1 answer
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.

Something like:

1) useradd user1 -d /path/to/dir1
2) useradd user2 -d /path/to/dir2
3) passwd user1
4) passwd user2
5) chown -R user1 /path/to/dir1
6) chown -R user2 /path/to/dir2

and then you can use sftp user1@host etc :)