[Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Jan 12 16:23:58 EST 2005


http://bugzilla.mindrot.org/show_bug.cgi?id=934

djm at mindrot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |



------- Additional Comments From djm at mindrot.org  2005-01-12 16:23 -------
Actually, this is still a known problem for the OpenSSH sftp client. You can't
"cd", but you can still do get/put/ls operations on the full path (see below).
The fix is as I described in comment #2, but I haven't implemented it yet.

[djm at baragon djm]$ cd /tmp
[djm at baragon tmp]$ mkdir -p dir_1/dir_2/dir_3
[djm at baragon tmp]$ chmod 0755 dir_1 dir_1/dir_2/dir_3
[djm at baragon tmp]$ chmod 111 dir_1/dir_2
[djm at baragon tmp]$ sftp -S /usr/libexec/sftp-server blah
Connecting to blah...
sftp> pwd
Remote working directory: /tmp
sftp> cd dir_1/dir_2/dir_3
Couldn't canonicalise: Permission denied
sftp> pwd
Remote working directory: /tmp
sftp> ls dir_1/dir_2/dir_3
sftp> put /bin/ls dir_1/dir_2/dir_3/foo
Uploading /bin/ls to /tmp/dir_1/dir_2/dir_3/foo
/bin/ls                                       100%  175KB 175.4KB/s   00:00
sftp> get /tmp/dir_1/dir_2/dir_3/foo /tmp/blah
Fetching /tmp/dir_1/dir_2/dir_3/foo to /tmp/blah
/tmp/dir_1/dir_2/dir_3/foo                    100%  175KB 175.4KB/s   00:00
sftp> ls -l dir_1/dir_2/dir_3
-r-xr-xr-x    1 djm      wheel      179648 Jan 12 16:25 foo
sftp> 




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-bugs mailing list