sftp and chroot

New to Debian (Or Linux in general)? Ask your questions here!

sftp and chroot

Postby arjena » 2020-02-23 20:58

Hi there.
I am experimenting with a server running Debian. It should replace my aging Apple server (and since the new Apple server is not a server anymore that is no longer an option).
So far everything goes fine, but I have a problem placing a user in chroot jail for sftp access. I am following this guide: https://www.thegeekstuff.com/2012/03/chroot-sftp-setup/
This goes well, but when I connect with a ftp client (cyberduck in this case) I arrive in the folder /sftp/guestuser/. I am not able to do anything in this folder, therefore (still following the guide) there is a folder 'incoming' inside the /sftp/guestuser directory where I can put/get files etc. But I know this will be confusing to my clients. They just want to log in to a given sftp address and put/get the files they want.
I have played around a bit with permissions and ownerships but I cannot find a way to get directly to the directory where i can actually do something.
After following the guide the guestuser directory that I go to after sftp-ing to the server has root:root ownership, the 'incoming' directory is guestuser:sftpusers, where sftpusers is the chrooted group for sftp in sshd_config.
The guide is from 2012, but I guess the principles are still the same...
arjena
 
Posts: 1
Joined: 2020-02-23 14:29

Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable