delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/08/11/10:54:55

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
MIME-Version: 1.0
Subject: Chrooted ssh and SFTP in cygwin
Date: Thu, 11 Aug 2005 16:54:41 +0200
Message-ID: <ACBE9A86FF7A5345B3194ACDDE7054EB015F88C6@tara.cdm.smis.ch>
From: "RITTER, Philippe" <phr AT cdm DOT smis DOT ch>
To: <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j7BEsswR007822

Hello

I'm trying to make a chrooted environnment in cygwin with
openssh-4.1p1-2

I can ssh with no problem, but sftp-server will not start because it
will not find cygwin1.dll in the path.

I use the chroot from http://chrootssh.sourceforge.net/download/

I looked in session.c but I don't understand when sshd set the path for
the session. I see it copies from windows, but not setting the default

Here the command I use to compile openssh :
./configure --prefix=/usr \
--sysconfdir=/etc \
--libexecdir='${sbindir}' \
--localstatedir=/var \
--datadir='${prefix}/share' \
--mandir='${datadir}/man' \
--infodir='${datadir}/info' \
--with-default-path='/usr/bin:/bin:/usr/sbin:/sbin' \
--with-tcp-wrappers

I my chrooted home I have :
$ ls -lR
.:
total 0
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 14:31 bin
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 16:20 etc
drwxr-xr-x+ 3 phr Domain Users 0 Aug 11 16:38 home
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 12:07 tmp
drwxr-xr-x+ 3 phr Domain Users 0 Aug 11 12:09 usr
drwxr-xr-x+ 3 phr Domain Users 0 Aug 11 14:24 var

./bin:
total 3792
-rwxr-xr-x  2 phr Domain Users  451072 Aug 11 12:08 bash
-rwxr-xr-x  2 phr Domain Users  451072 Aug 11 12:08 bash.exe
-rwxr-xr-x  1 phr Domain Users    6846 Aug 11 12:12 bashbug
-rwxr-xr-x  1 phr Domain Users    6656 Aug 11 12:07 cygcrypt-0.dll
-rwxr-xr-x  1 phr Domain Users 1015128 Aug 11 12:11 cygiconv-2.dll
-rwxr-xr-x  1 phr Domain Users   22016 Aug 11 12:11 cygintl-1.dll
-rwxr-xr-x  1 phr Domain Users   37888 Aug 11 12:11 cygintl-2.dll
-rwxr-xr-x  1 phr Domain Users   55612 Aug 11 12:11 cygintl-3.dll
-rwxr-xr-x  1 phr Domain Users   21504 Aug 11 12:11 cygintl.dll
-rwxr-xr-x  1 phr Domain Users  230400 Aug 11 14:12 cygncurses-8.dll
-rwxr-xr-x  1 phr Domain Users  147456 Aug 11 14:12 cygreadline6.dll
-rwxr-xr-x  1 phr Domain Users 1295582 Aug 11 12:08 cygwin1.dll
-rwxr-xr-x  1 phr Domain Users   89600 Aug 11 12:08 ls.exe
-rwxr-xr-x  1 phr Domain Users   23552 Aug 11 14:16 strace.exe

./etc:
total 8
-rwxr-x---  1 phr Domain Users 6530 Aug 11 16:20 profile

./home:
total 0

./tmp:
total 0

./usr:
total 0
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 14:31 sbin

./usr/sbin:
total 1076
-rwxr-xr-x  1 phr Domain Users 1067008 Aug 11 12:07 cygcrypto-0.9.8.dll
-rwxr-xr-x  1 phr Domain Users   29184 Aug 11 12:09 sftp-server.exe

./var:
total 0
drwxr-xr-x+ 2 phr Domain Users 0 Aug 11 14:23 run

./var/run:
total 0

Can someone help me ? I know I could copy everything from /bin in
/usr/sbin, but I would like something else.

Thanks
Philippe RITTER

--
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/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019