cancel
Showing results for 
Search instead for 
Did you mean: 

Difference in time stamps

SOLVED
Go to solution
Bob Manocchia
Regular Advisor

Difference in time stamps

I have a RHEL 4 server that when I ssh to it and do an ll I get the following:

drwxrwxr-x 6 publicweb webadmin 4096 Apr 14 11:04 idexx

When I ftp to the same box and cd to the same directory and do a dir I get the following:

drwxrwxr-x 6 655 611 4096 Apr 14 15:04 idexx

As you can see the time stamps are off by 4 hours for the same file.

Any ideas what is going on here.
6 REPLIES
skt_skt
Honored Contributor

Re: Difference in time stamps

i would suspect if there is any .profile setting while doing ssh makes this difference. While an ftp user does not go thorugh the same as the shell is /etc/nologin
Bob Manocchia
Regular Advisor

Re: Difference in time stamps

I checked all the login scripts (.bashrc, etc...) and I don't see anywhere where the clock would be set in this way.
Steven Schweda
Honored Contributor

Re: Difference in time stamps

Time zones? If you're in the Eastern time
zone (on DST), and the FTP server is
configured to show date-times in UTC, then I
could explain a four-hour difference like
that pretty easily. Knowing nothing, I'd
assume that the FTP server could be persuaded
to show local times, but that may or may not
be a good idea.
Bob Manocchia
Regular Advisor

Re: Difference in time stamps

We are running vsftpd. I checked the /etc/vsftpd/vsftpd.conf file and it gives no indication of displaying the date in GMT unless that is the default.
I also checked the user initiating the ftp and there is no indication it is doing it with that user as well.

I'm not sure where else to look.
Steven Schweda
Honored Contributor
Solution

Re: Difference in time stamps

> I'm not sure where else to look.

I know nothing, but a Google search for:
vsftpd
led to:
http://vsftpd.beasts.org/
http://vsftpd.beasts.org/vsftpd_conf.html
where a page search for "zone" found, in the
discussion of options in /etc/vsftpd.conf,
for example:

[...]
use_localtime
If enabled, vsftpd will display directory listings with the time in your local time zone. The
default is to display GMT. The times returned by the MDTM FTP command are also
affected by this option.

Default: NO
[...]

Might be worth looking into, if you actually
do wish to have the date-times displayed as
local.
Bob Manocchia
Regular Advisor

Re: Difference in time stamps

I found it in the vsftpd.conf man page. It states:

use_localtime
If enabled, vsftpd will display directory listings with the time in your local time zone. The default is to display GMT. The times returned by the MDTM FTP command are also affected by this option.

Thanks for the help.