This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SFTP doesn't work with ChrootDirectory option set


On Nov 18 00:02, TheO wrote:
> Actually my real objective is to use chroot for SFTP. I am planning to disable ssh login in the final configuration, I was using ssh just for testing the sshd capability for chrooting.

http://cygwin.com/acromyns/#TOFU

It's not enough to have a bash in the jailed /bin dir.  You need at least
a copy of all DLLs the applications (including sftp-server) are using,
especially an exact copy of the Cygwin DLL.

Having said that...

Cygwin, being just another application layer, requires OS support for
certain functionality.  chroot is one of them.  chrooting isn't
supported by Windows.  All Cygwin is doing is to fake chroot for Cygwin
applications, as long as they are playing nice and only use POSIX
functions for file access.  As soon as they use Win32 functions, the
fake is uncovered.

Bottom line, you don't get any additional security by using chroot on
Cygwin.  You're just adding complexity to your setup.  Most of the time
you can use other measures to restrict the user anyway.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]