[scponly] unable to rsync with rsync-enabled scponlyc ...
user
user at dhp.com
Wed Oct 26 16:38:53 EDT 2005
I have installed scponly on a FreeBSD 5.4 system, using the compile time
options:
WITH_SCPONLY_CHROOT="yes" WITH_SCPONLY_RSYNC="yes"
It has been working fine for me - I have successfully scp'd documents to
my target users on the host that have the scponlyc shell specified as
their shell. I have tested the chroot cage, and that works as well.
I cannot, however, rsync as those user.
When I try to rsync files to that user at host, I get this error:
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(365)
Here is a small transcript that shows I can successfully scp a file, but
not rsync:
#
#
# scp hepper good at 192.168.0.4:/good
Password:
hepper
100% 0 0.0KB/s 00:00
#
# rsync -avz -e ssh hepper good at 192.168.0.4:/good
Password:
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(365)
#
#
my /etc/passwd line for user "good" looks like:
good:*:1002:1002::0:0:User &:/home:/usr/local/sbin/scponlyc
As you can see, the users home directory is simply /home - I exploded the
chroot contents into /home for everyone, and then set everyones home
directory to /home, but set their chroot directory to /home/(username)
This seemed to be a common practice for keeping a sane home directory
structure while at the same time maintaining a chroot (provided
permissions are robust).
So ... why can't I rsync ?
More information about the scponly
mailing list