bugzilla-daemon at bugzilla.mindrot.org
2017-Apr-24 14:46 UTC
[Bug 2710] New: remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 Bug ID: 2710 Summary: remote ls -l <name> produces inconsistent info Product: Portable OpenSSH Version: 7.5p1 Hardware: ix86 OS: Linux Status: NEW Severity: normal Priority: P5 Component: sftp Assignee: unassigned-bugs at mindrot.org Reporter: doug at cs.dartmouth.edu Remote ls -l produces different information for the same files depending on whether or not a file argument (including wildcards) is present. With a file argument, the link count is 0 and user and group are given by number. Without an argument, link count is correct and user and group are given by name. The OS's where I have observed this are local=cygwin64 or Linux and remote=Linux. I haven't tried any others. To observe the behavior make an sftp connection, then execute commands ls -l ls -l * I do not know the versions of sftp, since the command does not seem to support a version inquiry. However the versions of ssh are OpenSSH_7.4p1, OpenSSL 1.0.2j 26 Sep 2016 on cygwin64 OpenSSH_6.9p1, OpenSSL 1.0.1k-fips 8 Jan 2015 on Linux -- You are receiving this mail because: You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Apr-28 03:44 UTC
[Bug 2710] remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org --- Comment #1 from Damien Miller <djm at mindrot.org> --- This is unfortunate, but expected. When doing plain 'ls -l', the sftp-client uses the "longname" listing that is generated by the server since it often provides information that is otherwise unavailable through the sftp protocol (e.g. user/group names). When doing a globbed ls, e.g. "ls -l *', sftp generates the listing at the client side from the sftp equivalent of stat() operations on the files. We might implement a protocol extension to get user/group names from the remote end, then we could use the latter path for consistency always (for servers that support the extension anyway). -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Apr-28 21:25 UTC
[Bug 2710] remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 --- Comment #2 from DOUGLAS MCILROY <doug at cs.dartmouth.edu> --- It is more than unfortunate. It gives misinformation: link count 0. One can learn by experiment that this is a quirk, but one's first impression is that something has gone wrong. While a change in protocol probably is the best fix, the bug could be ameliorated by either of the following client-side methods: 1. Always perform ls -l as if it had no arguments, then display only the requested entries. This gives fully familiar output at extra cost in server-side processing and data transmission. It probably entails a net reduction in code. 2. Display link count as a nonnumeric indicator, e.g. one of {- _ ?}. This eliminates the worst misunderstanding, but still gives surprising, although correct, uid and gid. It costs nothing. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Jun-02 05:59 UTC
[Bug 2710] remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned-bugs at mindrot.org |djm at mindrot.org CC| |dtucker at zip.com.au Attachment #2989| |ok?(dtucker at zip.com.au) Flags| | --- Comment #3 from Damien Miller <djm at mindrot.org> --- Created attachment 2989 --> https://bugzilla.mindrot.org/attachment.cgi?id=2989&action=edit Replace link count with '?' when unavailable I, and most people I've asked, prefer the user/group names to uid/gid, so I think making sftp do the equivalent to "ls -l" would be a negative change. This patch replaces the link count for the locally-synthesised file list with '?' when it is unavailable. -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Jun-02 05:59 UTC
[Bug 2710] remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |2698 Referenced Bugs: https://bugzilla.mindrot.org/show_bug.cgi?id=2698 [Bug 2698] Tracking bug for OpenSSH 7.6 release -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Jun-10 00:58 UTC
[Bug 2710] remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #2989|ok?(dtucker at zip.com.au) |ok+ Flags| | -- You are receiving this mail because: You are watching someone on the CC list of the bug. You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2017-Jun-10 06:41 UTC
[Bug 2710] remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #4 from Damien Miller <djm at mindrot.org> --- patch applied. This will be in OpenSSH 7.6 -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2018-Apr-06 02:26 UTC
[Bug 2710] remote ls -l <name> produces inconsistent info
https://bugzilla.mindrot.org/show_bug.cgi?id=2710 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #5 from Damien Miller <djm at mindrot.org> --- Close all resolved bugs after release of OpenSSH 7.7. -- You are receiving this mail because: You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
Maybe Matching Threads
- [Bug 1935] New: ls -l with wildcards produces incorrect output
- [Bug 1495] New: sftp performance of "ls -l" cmd is slow on network-authed servers
- [Bug 2694] New: sftp ls command ignores sorting flags for globbed listing
- "ls -l" command and performance of sftp
- [Bug 2698] New: Tracking bug for OpenSSH 7.6 release