[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problem with rssh and chroot() (amd64 / testing)



Hi,

I've got a problem configuring rssh with a chroot jail.
When I try to sftp privateshare@mymachine I get disconnected immediatly.

I've used the script in /usr/share/doc/rssh/examples and configured /etc/rssh.conf like this :

sebastien@tidus:/var/log$ cat /etc/rssh.conf | grep -v "^#"

logfacility = LOG_USER
allowscp
allowsftp
umask = 022
user=privateshare:077:00011:/var/chroot/privateshare

Also user privateshare exists and is configured like this

tidus:~# cat /etc/passwd | grep privateshare
privateshare:x:1002:1003:,,,:/:/usr/bin/rssh

The jail was created by the example script, modified to point to the good directories . here is the modified section :

scp_path="/usr/bin/scp"
sftp_server_path="/usr/lib/openssh/sftp-server"
rssh_path="/usr/bin/rssh"
chroot_helper_path="/usr/lib/rssh/rssh_chroot_helper"

All the needed libs were copied, I also copied the entire lib/ directory, in order to found a possibly maybe lacking lib.

I also copied lib64/ /usr/lib dirs and verified that all the binaries where well linked ... but I still have this (syslog) :

Jun  3 13:55:07 localhost rssh[833]: setting log facility to LOG_USER
Jun  3 13:55:07 localhost rssh[833]: allowing scp to all users
Jun  3 13:55:07 localhost rssh[833]: allowing sftp to all users
Jun  3 13:55:07 localhost rssh[833]: setting umask to 022
Jun  3 13:55:07 localhost rssh[833]: chrooting all users to usr/local/chroot
Jun  3 13:55:07 localhost rssh[833]: line 31: configuring user privateshare
Jun  3 13:55:07 localhost rssh[833]: setting privateshare's umask to 077
Jun  3 13:55:07 localhost rssh[833]: allowing scp to user privateshare
Jun  3 13:55:07 localhost rssh[833]: allowing sftp to user privateshare
Jun 3 13:55:07 localhost rssh[833]: chrooting privateshare to /var/chroot/privateshare Jun 3 13:55:07 localhost rssh[833]: chroot cmd line: /usr/lib/rssh/rssh_chroot_helper 2 "/usr/lib/openssh/sftp-server" Jun 3 13:55:07 localhost rssh_chroot_helper[833]: new session for privateshare, UID=1002 Jun 3 13:55:07 localhost rssh_chroot_helper[833]: chroot() failed, 2: Operation not permitted

If someone could help.

Thanks to all of you

Sébastien



Reply to: