[Bug 3021] New: Openssh/sftp question related to timezone difference with "ls -l"

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Thu Jun 20 00:49:56 AEST 2019


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.


More information about the openssh-bugs mailing list