I have been trying to set up a SFTP server with multiple users chrooting into their home directories. I followed the advice on this guide (Archive.org link) and then executed the following commands on the user's directories
chown root:root /home/user/
chmod 755 /home/user/
There is an additional folder in every user's home directory called public
, which is owned by its user so as to allow them to create directories and upload and remove files as needed. (This was advised in the guide I mentioned earlier)
Now when I execute sftp -P 435 user@localhost
, I get this error:
Write failed: Broken pipe
Couldn't read packet: Connection reset by peer
How do I proceed from here? The ultimate idea is to have each user on some other machine use FileZilla to log into their chrooted home directories and then be able to upload directories and files. All this in SFTP (because it's more secure)