ich habe scponly mit chroot unter Debian Squeeze 64bit installiert. Ziel ist, dass ein User per SCP Zugriff auf ein Verzeichnis unter /var/www/ bekommt. Ich habe deswegen mit /usr/share/doc/scponly/setup_chroot/setup_chroot.sh einen User angelegt und sein Home auf /var/www/example.org/ gelegt. Nachdem ich paar libs kopiert habe funktioniert es, mit scp eine Datei zu speichern (außerdem Debug eingeschaltet):
- Code: Alles auswählen
user@greulix:~/download$ scp de-DE_joomla_lang_full_2.5.1v1.zip BENUTZER@example.com:/www
BENUTZER@example.com's password:
scponly[10542]: chrooted binary in place, will chroot()
scponly[10542]: 3 arguments in total.
scponly[10542]: arg 0 is scponlyc
scponly[10542]: arg 1 is -c
scponly[10542]: arg 2 is scp -t -- /www
scponly[10542]: opened log at LOG_AUTHPRIV, opts 0x00000029
scponly[10542]: determined USER is "BENUTZER" from environment
scponly[10542]: retrieved home directory of "/var/www/example.org/" for user "BENUTZER"
scponly[10542]: chrooting to dir: "/var/www/example.org/"
scponly[10542]: chdiring to dir: "/"
scponly[10542]: setting uid to 1002
scponly[10542]: processing request: "scp -t -- /www"
scponly[10542]: Using getopt processing for cmd /usr/bin/scp
(username: BENUTZER(1002), IP/port: 46.xx.xx.xx 55559 22)
scponly[10542]: getopt processing returned 't' (username: BENUTZER(1002), IP/port: 46.xx.xx.xx 55559 22)
scponly[10542]: running: /usr/bin/scp -t -- /www (username: BENUTZER(1002), IP/port: 46.xx.xx.xx 55559 22)
scponly[10542]: about to exec "/usr/bin/scp" (username: BENUTZER(1002), IP/port: 46.xx.xx.xx 55559 22)
de-DE_joomla_lang_full_2.5.1v1.zip 100% 297KB 296.6KB/s 00:00
user@greulix:~/download$
Wenn ich das aber mit WinSCP oder gftp probiere bekomme ich bei gftp irgendwann einen Timeout und WinSCP spuckt "Cannot initialize SFTP protocol. Is the host running a SFTP" aus.
Hier mal die Berechtigungen der Verzeichnisse:
- Code: Alles auswählen
root@yggdrasil:/var/www/example.org# ls -al
insgesamt 7064
drwxr-xr-x 10 root root 4096 1. Mär 12:46 .
drwxr-xr-x 9 root root 4096 28. Feb 14:52 ..
drwxrwxr-x 2 root root 4096 29. Feb 11:45 bin
drwxrwxr-x 2 root root 4096 29. Feb 11:45 dev
drwxrwxr-x 2 root root 4096 29. Feb 11:45 etc
-rw-rw-r-- 1 root root 7180013 28. Feb 14:55 Joomla_1.5.25-Stable-Full_Package_German.zip
drwxrwxr-x 2 root root 4096 29. Feb 12:49 lib
drwxrwxr-x 2 root root 4096 29. Feb 12:10 lib64
drwxrwxr-x 4 root root 4096 29. Feb 11:45 usr
drwxrwxr-x 3 root root 4096 29. Feb 11:45 var
drwxrwxr-x 32 www-data www-data 4096 1. Mär 13:01 www
root@yggdrasil:/var/www/example.org#
Der Benutzer "BENUTZER" ist in der Gruppe www-data. Dass er nicht in / schreiben kann ist egal, die eigentliche Seite liegt unter www.
Hat jemand eine Idee, was noch faul sein könnte?


