bugzilla-daemon at bugzilla.mindrot.org
2019-Jun-19 14:49 UTC
[Bug 3021] New: Openssh/sftp question related to timezone difference with "ls -l"
https://bugzilla.mindrot.org/show_bug.cgi?id=3021
Bug ID: 3021
Summary: Openssh/sftp question related to timezone difference
with "ls -l"
Product: Portable OpenSSH
Version: 7.7p1
Hardware: Other
OS: Linux
Status: NEW
Severity: trivial
Priority: P5
Component: sftp
Assignee: unassigned-bugs at mindrot.org
Reporter: sebastian.woell at db.com
Hi team,
I am experiencing some strange behaviour when I run an ?ls -l? in an
sftp session (both server and client are openssh) ? and I am wondering
if the behaviour is a feature or a bug.
The issue occurs if server time zone differs from client time zone. And
I have also tested this with different combinations of openssh server
and client versions on different operating systems (AIX, Linux and
Solaris) ? the issue always exists.
The issue is the following:
When I run an ?ls ?l? in a dir, the timestamp of the files in the dir
are shown in server (remote) time zone. But if I run the ?ls ?l ? for a
specific file, the time is shown in client time zone.
Sample log of the connection:
Client: Openssh version 7.70.11.0, AIX 7.1, Timezone Europe/Berlin
Server: Openssh version 7.50.14.0, RHEL 7.4, Timezone Asia/Singapore
sftp> ls -l
-rwxr-xr-x 1 root system 1267 Jun 19 15:05 test.sh
sftp> ls -l test.sh
-rwxr-xr-x ? 0 0 1267 Jun 19 21:05 test.sh
What I also see is that in the ?ls ?l <filename>? version, the owner
and group are also no longer shown as names.
Is there anyone that can explain this to me?
Thanks,
Sebastian
--
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2023-Oct-11 06:02 UTC
[Bug 3021] Openssh/sftp question related to timezone difference with "ls -l"
https://bugzilla.mindrot.org/show_bug.cgi?id=3021
Damien Miller <djm at mindrot.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |WONTFIX
CC| |djm at mindrot.org
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
This was caused by the timestamps in sftp's ls being generated by the
client for the "ls -l file" case but the server for the "ls -l
dir"
case.
Since this bug was filed, sftp now generates "ls -l dir" on the client
if it is talking to a compatible sftp-server that supplies user/group
info. There unfortunately isn't much more we can do here to fix this.
--
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.