Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - sftp chroot (again?): (2 Items)
   
sftp chroot (again?)  
I'm using QNX 6.5 and my assignment is to get sftp working with the ChrootDirectory directive.   I'm wondering if anyone
 else had been successful doing this.   I've overcome one challenge already.   sshd requires a pipe, but in a chroot 
jail, there is no /dev/pipe device.   The solution was to start pipe in the same chroot jail from a program running as 
root.  

Now I can login and have some functionality, for example, if there's a file xyz in my directory I can do this:

sftp> get /xyz

or if there is a directory abc I can do this

sftp> ls /abc

However a lot of stuff doesn't work.   For example, If my chroot jail is /usr/test then

sftp> pwd

gives

/usr/test

which is wrong, it should be /

If I do this:

sftp> ls

I get an error that /usr/test doesn't exist.

And finally if I try 

sftp> cd /abc
I get an error
Couldn't stat remote file: No such file or directory

Clearly something is broken.    Can anyone help?
Re: sftp chroot (again?)  
I am having similar issues with SSH and chroot jail. My WinSCP client session terminates with 'Server refused to start a
 shell/command' and the last outputs from the /var/log/syslog on the server side are:
Jan 13 12:42:02 nto sshd[5943343-1]: debug3: safely_chroot: checking '/'
Jan 13 12:42:02 nto sshd[5943343-1]: debug3: safely_chroot: checking '/home/'
Jan 13 12:42:02 nto sshd[5943343-1]: debug3: safely_chroot: checking '/home/update/'
Jan 13 12:42:02 nto sshd[5943343-1]: debug3: safely_chroot: checking '/home/update/files'
Jan 13 12:42:02 nto sshd[5935141-1]: debug3: monitor_read: checking request 60
Jan 13 12:42:02 nto sshd[5935141-1]: debug3: mm_answer_term: tearing down sessions

I have not idea why the 'tearing down sessions' is happening.

Any idea ??
/Per