chroot/jail von scponly unvollständig?
Hallo,
experimentiere gerade mit scponly(c), um User über sftp in einem
Verzeichnis zu halten, ähnlich wie das bei FTP Standard ist, mit
Unterverzeichnissen wie pub und incoming. Den SSH-Server möchte ich
nicht patchen, und der chroot-Patch ist nach meinen Recherchen noch
nicht standardmäßig drin. An sich kann scponly auch genau das was ich
brauche, aber bei der Arbeit mit dem chroot scheint was schief zu gehen
- ich kenne mich da leider noch gar nicht mit aus, bis auf das was ich
mir heute angelesen habe ist das mein erster Kontakt mit jails wie chroot.
Jedenfalls ist bei der Debianversion von scponly ein Skript
setup_chroot.sh dabei, welches ein angepaßtes jail für einen neuen User
installiert, der dann auch nur eingeschränkte Befehle zur Verfügung hat,
wie Up-/Download, syncen usw.
So sieht das jail dann aus:
root@linux:/etc/scponly# la /opt/mp3/sync/
insgesamt 36K
drwxr-xr-x 7 root root 4,0K 2007-07-04 12:43 .
drwxr-xr-x 8 frisco staff 12K 2007-07-04 12:40 ..
drwxr-xr-x 2 root staff 4,0K 2007-07-04 12:43 bin
drwxr-xr-x 2 root root 4,0K 2007-07-04 12:43 etc
drwxr-xr-x 3 root staff 4,0K 2007-07-04 12:43 lib
drwxr-xr-x 2 rolli rolli 4,0K 2007-07-04 12:43 _Neu
drwxr-xr-x 4 root staff 4,0K 2007-07-04 12:41 usr
root@linux:/etc/scponly#
Jedenfalls funktioniert das nicht, weil scheinbar /dev/null nicht
gefunden wird.
root@linux:# scp test rolli@meinserver.de:123/_Neu/
rolli@meinserver.de's password:
scponly[13393]: chrooted binary in place, will chroot()
scponly[13393]: 3 arguments in total.
scponly[13393]: arg 0 is scponlyc
scponly[13393]: arg 1 is -c
scponly[13393]: arg 2 is scp -t 123/_Neu/
scponly[13393]: opened log at LOG_AUTHPRIV, opts 0x00000029
scponly[13393]: retrieved home directory of "/opt/mp3/sync" for user "rolli"
scponly[13393]: chrooting to dir: "/opt/mp3/sync"
scponly[13393]: chdiring to dir: "/"
scponly[13393]: chdiring to dir: "/"
scponly[13393]: setting uid to 1006
scponly[13393]: processing request: "scp -t 123/_Neu/"
scponly[13393]: Found "HOME" and setting it to "/opt/mp3/sync"
scponly[13393]: Environment contains "HOME=/opt/mp3/sync"
scponly[13393]: set HOME environment variable to / username:
rolli(1006), IP/port: 192.168.0.11 45658 22
scponly[13393]: running: /usr/bin/scp -t 123/_Neu (username:
rolli(1006), IP/port: 192.168.0.11 45658 22)
Couldn't open /dev/null: No such file or directorylost connection
root@linux:/etc/scponly#
Hat jemand 'ne Idee was da schief läuft bzw. wie ich das beheben kann?
Andre
--
Personal weblog and more: http://bischof.homelinux.net
"Das Schwein trägt seinen Namen nicht umsonst" - Stilblüten aus
Kinderaufsätzen: (Fernsehen)
Kinder werden vom Fernseher im Schlaf beschnitten.
Reply to: