hello,
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:
Code:
remote open("/user1/file.txt"): Permission denied
when i look in /var/log/messages
i see the error:
Code:
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:
/etc/ssh/sshd_config:
Code:
Subsystem sftp internal-sftp
Match group sftponly
ChrootDirectory /home/chroot-users
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
permissions:
Code:
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
/etc/passwd:
Code:
user1:x:502:502::/user1:/bin/false
/etc/group:
Code:
sftponly:x:502:user1
any help in getting the write working would be appreciated.
cheers!