[megoldva, megmagyarázva] sftp vs. scp

Fórumok

Sziasztok,

A következő problémám: beállítottam, h egy csoport csak másolni tudjon az acc.-ával, chroot-olt környezetben. Igazából az a problémám, h míg sftp-vel tudok felmásolni cuccokat, addig scp-vel nem. És csak az, aki abban restricted csoportban van. Van valakine 5lete, h miért van ez? Igazából nem annyira para, csak érdekel.
Jah, aki scp-ni probal, annak a következőt dobja az scp -vvv:

user@haven's password:
debug3: packet_send2: adding 64 (len 53 padlen 11 extra_pad 64)
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
debug2: fd 5 setting O_NONBLOCK
debug2: fd 6 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending command: scp -v -t .
debug2: channel 0: request exec confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0

És itt megáll és nem történik semmi.

^C -- Itt én szakítottam meg...
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
#0 client-session (t4 r0 i0/0 o0/0 fd 5/6 cfd -1)
debug3: channel 0: close_fds r 5 w 6 e 7 c -1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Killed by signal 2.

A user /bin/false a shellje.
Az sshd_config idevonatkozó részei:

Subsystem sftp internal-sftp
Match Group sftponly
ChrootDirectory /mnt/onlysftp/%u
AllowTcpForwarding no
X11Forwarding no
AllowAgentForwarding no
ForceCommand internal-sftp

Köszi,
Sz.

Hozzászólások

Az internal-sftp csak sftp-t tamogat. Tessek azt a protokollt hasznalni.
--


Ki oda vagyik, hol szall a galamb, elszalasztja a kincset itt alant.

Az scp úgy működik, hogy a bejelentkezés (és a chroot) után indítaná az scp binárist (kb. pont úgy, mint ahogy az rcp működik).
Ami nyilván nem jön neki össze.

Köszi a válaszokat! így már világos...