I Haven't had a change to look at your suggestion yet sunilpopaliya, but I'm sure if Turbocapitalist wants to spar a little with me (I've deduced you're not a noob by now
), this probelem will be solved.
The problem is, as you say, that the parent of the directory where the SFTP user is dropped must belong to root and only to root. As it is, though, the user is dropped in his/her home dir and I dont really want to mess with /home.
I made the followoing changes to /etc/ssh/sshd_config:
Changed:
# override default of no subsystems
#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp
Made this based on the group "filetransfer" per howto #2 above.
Now %h is obviously the user's /home directory as that as where they're put.
I've tried various forms of %h/ftp/home but without much luck, I'd rather jail a user a little into a directory a little further up the chain, or longer into their user home if you will.
Regards,
Søren