bugzilla-daemon at mindrot.org
2005-Jan-09 16:38 UTC
[Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
http://bugzilla.mindrot.org/show_bug.cgi?id=934 ------- Additional Comments From opensshbugzilla at prikryl.cz 2005-01-10 03:38 ------- Hello, I'm author of the metioned SFTP client (WinSCP). I have been just experimenting with this issue. For me realpath does succeed on OpenSSH server on Linux (shell.sourceforge.net). With OpenSSH client (sftp) I'm able to enter the traverse-only directory. Of course I'm not able to list its content. With my client (WinSCP) and PSFTP (Putty package) I'm not able to enter it. The reason it that both clients attempt to read the directory content (just open/close, no reading actually) in addition to doing "realpath" on it to make sure it actually exists. I do not know why Putty authors does this. I'm doing it because on some servers (for example OpenSSH on cygwin) "realpath" succeeds even for non-existing directories. I guess I'll do "stat" instead of reading the directory. So I believe you may close this bug, as there is no problem neither with OpenSSH client nor server. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jan-10 17:45 UTC
[Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
http://bugzilla.mindrot.org/show_bug.cgi?id=934
mgjk at idirect.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
------- Additional Comments From mgjk at idirect.com 2005-01-11 04:45 -------
As per your feedback, I'm tagging this as resolved-invalid. Thank you very
much
to everyone for having a look at this. Will the new versions of PSFTP and
WinSCP contain the code change you described?
Thanks again,
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Jan-12 05:23 UTC
[Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
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.
Possibly Parallel Threads
- [Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
- [Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
- [Bug 934] Traverse-only directories (e.g. chmod 110) break the cd command in sftp
- Another "function does not return a value" problem
- How file store when using Btrfs on multi-devices? What happen when a device fail?