[scponly] Still strange things with scp in chroot... :-|

YLB ylebihan at gmail.com
Thu Mar 30 15:43:22 EST 2006


Hello everybody ! :-)

Well, there's still one thing I don't understand. I'm now able to
connect to my server's chrooted account using scp. I get the result of
"ls -la" with no matter.
But when I try to transfer or get a file, scp doesn't work ! The
binary "scp" is well put in the directory {chroot}/usr/bin/ and the
system finds it.

-------------------------------------

Using debug, I get this in the syslog :

Mar 30 20:18:11 server scponly[11572]: running: /usr/bin/scp -t .
(username: testuser(517), IP/port: xxx.yyy.zzz.uu 55717 22)

-------------------------------------

So, it's running. But on the client machine, I get this :

[me at other-server me]$ scp file-to-test.txt testuser at server.domain.com:
Password:
unknown user 517
lost connection
[me at other-server me]$

-------------------------------------

I thought of a problem with passwd / group files but I don't understand :

Without chroot:

[root at server root]# cat /etc/passwd | grep testuser
testuser:x:517:517::/home/testuser//testuser:/usr/local/sbin/scponlyc
[root at server root]# cat /etc/group | grep testuser
testuser:x:517:
[root at server root]#

-------------------------------------

In chrooted directory:

[root at server root]# cat /home/testuser/etc/passwd | grep testuser
testuser:x:517:517::/testuser:/usr/local/sbin/scponlyc
[root at server root]# cat /home/testuser/etc/group | grep testuser
testuser:x:517:
[root at server root]#

-------------------------------------

Do you have any idea ? I've been working on that a long time and I'm
exhausted... I go asleep now, but I would be very happy if someone
could help me !! ;)

Cheers,

YLB.



More information about the scponly mailing list