Joshua Sandbrook wrote:

Gidday

Im writing a shell at the moment that chroots into a users home dir and then runs only the sftp-server program ( which is in the uses home dir ).

Anyway, it wont work unless /dev/null is present in the chroot... I am using execve to run sftp-server, and I am wondering if it has something to do with stdout / stdin / stderr fd's being closed on execve? Can anyone help me here? Thanks, Josh


</de-lurk>

Alternatively, might something like rssh be useful?

http://pizzashack.org/rssh/


This is a shell, designed to only allow scp/sftp/et al, but not allow any sort of command execution in the traditional sense. It also supports chroot.

The only small fly in the ointment, is that according to http://pizzashack.org/rssh/platforms.shtml it doesn't work on *BSD, as it requires the missing wordexp() function. However, the page dates back to 2003, and I haven't the skills to check if this is still the case...

Don't know if this helps or not, but I thought I'd throw it into the mix :-)

Si1entDave

Reply via email to