[scponly] Connection closed ... when i change home folder

Kaleb Pederson kaleb.pederson at gmail.com
Mon Mar 2 14:13:41 EST 2009


On Sun, Mar 1, 2009 at 2:09 PM, Thomas Bassetto <tbassetto at gmail.com> wrote:
> Hi,
>
> I've installed scponly on a Debian Etch with the default procedure :
> http://sublimation.org/scponly/wiki/index.php/Install#Installing_scponly_on_Debian_4.0.28Etch.29_with_apt
>
> It works well when I create user's home directory in /home (like
> /home/test or /home/scponly) :)

How are you creating the folders?  Have you tried copying a
known-working home directory to a different location for testing?

> But if I create the home folder in /srv/websites/username (like
> /srv/websites/test) the connection doesn't work :

The only thing that comes to my mind that's relevant are the
differences in the home directories and permissions.  The
setup_chroot.sh script is fairly weak, so perhaps it's breaking on the
different structure for some reason. You might try using Jailkit or
some other chroot builder.

Also, you might consider grabbing the latest source code and building
from that as you might getter better diagnostics depending on the
version that apt installed.

Good luck.

--Kaleb

> #sftp test at localhost
> Connecting to localhost…
> test at localhost’s password:
> Connection closed
>
> Extract of /var/log/auth.log :
> Mar  1 21:55:21 synapseserv sshd[29038]: Accepted password for test
> from X.X.X.X port 51985 ssh2
> Mar  1 21:55:21 synapseserv sshd[29040]: (pam_unix) session opened for
> user test by (uid=0)
> Mar  1 21:55:22 synapseserv sshd[29040]: subsystem request for sftp
> Mar  1 21:55:22 synapseserv scponly[29041]: chrooted binary in place,
> will chroot()
> Mar  1 21:55:22 synapseserv scponly[29041]: 3 arguments in total.
> Mar  1 21:55:22 synapseserv scponly[29041]: ^Iarg 0 is scponlyc
> Mar  1 21:55:22 synapseserv scponly[29041]: ^Iarg 1 is -c
> Mar  1 21:55:22 synapseserv scponly[29041]: ^Iarg 2 is
> /usr/lib/openssh/sftp-server
> Mar  1 21:55:22 synapseserv scponly[29041]: opened log at
> LOG_AUTHPRIV, opts 0x00000029
> Mar  1 21:55:22 synapseserv scponly[29041]: retrieved home directory
> of "/srv/websites/test" for user "test"
> Mar  1 21:55:22 synapseserv scponly[29041]: chrooting to dir:
> "/srv/websites/test"
> Mar  1 21:55:22 synapseserv scponly[29041]: chdiring to dir: "/"
> Mar  1 21:55:22 synapseserv scponly[29041]: chdiring to dir: "/"
> Mar  1 21:55:22 synapseserv scponly[29041]: setting uid to 1004
> Mar  1 21:55:22 synapseserv scponly[29041]: processing request:
> "/usr/lib/openssh/sftp-server"
> Mar  1 21:55:22 synapseserv scponly[29041]: running:
> /usr/lib/sftp-server (username: test(1004), IP/port: X.X.X.X 51985 22)
> Mar  1 21:55:22 synapseserv sshd[29040]: (pam_unix) session closed for user test
>
> Do you see what's wrong ?
>
> Thanks.
>
> _______________________________________________
> scponly mailing list
> scponly at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/scponly
>



More information about the scponly mailing list