[scponly] Unable to transfer files

Jason Lunghusen jason.lunghusen at rmit.edu.au
Sun Jul 31 18:22:11 EDT 2005


Hello all,
             I'm trying to correctly set up scp (scponlyc) and am experiencing an error message when using WinSCP to copy a file from the local hdd to the users directory:

* 2005-07-29 13:40:17.416 (ECommand) Copying files to remote side failed.
* 2005-07-29 13:40:17.416 Cannot execute SCP to start transfer. Please make sure that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP.
* 2005-07-29 13:40:17.416 Command failed with return code 255.

The user (rberry) is able to see SCP, his etc/passwd entry is normally:

rberry:x:1005:100::/home/scponly//home/rberry:/usr/local/sbin/scponlyc

if I change his shell in /etc/passwd from /usr/local/sbin/scpcopyc to /bin/bash then su -l rberry he can definitely see scp:

NAGIOS2:/home/scponly/home # su -l rberry

rberry at NAGIOS2:~> echo $PATH
/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib/jvm/jre/bin:/usr/local/sbin

rberry at NAGIOS2:~> scp
usage: scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 [...] [[user@]host2:]file2

If I leave the users shell as /bin/bash (instead of /usr/local/sbin/scponlyc) and log in using WinSCP I get /home/rberry as their home directory and am able to transfer files with no issues.  I've also tried chmod 777 for /home/scponly/home/rberry when the users shell is /usr/local/sbin/scponlyc and that doesn't help so I'm guessing it's not a permissions issue.  It seems as though when scponlyc is the shell it can't read the users path and therefore can't see scp?

I'd appreciate any assistance,

Jason













More information about the scponly mailing list