I have a need to set up an SFTP server which is multi user. The users in question have read-only access to their chrooted folders.
I need to be able to put files to these folders via SFTP with a different, administrative user account.
(For the purposes of this question I'll call my read-only sftp user example user1 and my member of sudoers admin account admin1)
I followed instructions here -
but instead of
chown root on the user's directory I did
I could not log via sftp using the user1's credentials.
I then did
chown root on the user's home folder (to follow more closely the instructions on the terminaltwister article) and was then able to log in as user1 via sftp, but when logging in as admin1 I was not able to put files to user1's folders.
I've disabled Root login via SSH (it's recommended) so I don't want to use root to put the files. I want to be able to put files to my users folders using admin1, and have each user be able to log in via sftp and have read-only access to their respective folder.
I can't quite wrap my head around how to do this. Can anyone advise?