I have a problem with chroot sftp an their home folder. I would like to write in user's home but I don't have proper permission for doing that.
Match User demo ChrootDirectory %h ForceCommand internal-sftp AllowTcpForwarding no X11Forwarding no
root@xxx:/# ls -l /home/ftp/ drwxr-xr-x 2 root root 4096 Nov 3 13:35 demo2
debug1: channel 0: new [client-session] debug1: Requesting email@example.com debug1: Entering interactive session. Write failed: Broken pipe
I know that I can write into a folder under /home/ftp/demo2 but I need to write in /home/ftp/demo2 not in a inner folder, it's mandatory.
I've tried to change demo2 permissions and user/group, but it was not possible to write in it.
And.. there are other problem. I have 3 users that have their homes under /home/ftp but, on the other hand, I have some users that have their home in a different path, so I can't use ChrootDirectory /home/ftp/%u, I need to use %h
Are there any way to do this?
Thanks a lot!