I have been trying to set up sftp with chrooted users.
I am able to sftp to the user's chrooted home directory
I am able to list files after sftp'ing using 'ls'
But whenever I try to write to the chrooted directory I get the error:
remote open("/user1/file.txt"): Permission denied
when i look in /var/log/messages
i see the error:
SELinux is preventing sshd "create" access on file.txt
If I set SElinux to permissive I am able to write the file but the user can navigate to other home directories, etc.
my seetings and permissions:
Subsystem sftp internal-sftp
Match group sftponly
drwxr-xr-x. 7 root root 4096 Oct 22 12:33 home
drwxr-xr-x. 4 root root 4096 Oct 22 13:48 chroot-users
drwxr-x---. 4 user1 user1 4096 Oct 22 13:37 user1
any help in getting the write working would be appreciated.