While using internal sftp server, need to access files outside chroot

Raghu Udupa rudupa at easylink.com
Fri Jun 8 02:40:42 EST 2012


Hi,

I need to make a custom code change in sftp-server module to copy the received file outside the chroot-setup.  I am trying to chroot repeatedly to get physical root directory and the copy received file to a directory outside chrooted directory.

The children processes are owned by the sftp-user and so, sftp child process does not have permission to escape out of chroot.

Is there a simple way where I can spawn child processes for sftp so that these processes are owned by root.

I tried to change user to root, but user root is not defined in chroot environment and so, setting setuid and becoming root to chroot is not an option.

Thanks,
Raghu


More information about the openssh-unix-dev mailing list