LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 09-27-2007, 08:52 AM   #1
dgr
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Rep: Reputation: 15
time on our RH linux FTP server is four hours ahead, but desktop time is correct??


hello,
we installed a new red had linux server a couple of months ago, and one service we have running on it is FTP, then from various desktops around the office people can use FTP software to go to the server and upload/download files.
A problem we've had with FTP is that the Modified/Created times on the files when you look at them from any desktop through FTP software is 4 hours ahead (and there's no time offset set in the FTP software). But if you look at the time on the desktop of the linux server it the correct time.
Does anyone know why this 4 hour time difference is occuring and how to correct it so it'll say the current/correct time?

thanks in advance,
david
 
Old 09-27-2007, 09:15 AM   #2
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Maybe, is time on the ftp server set to a different timezone? If this is the case, clients convert the timestamp of downloaded files to their local timezone. Anyway, it is a good practice to set time as UTC on file servers, so that clients can easily know when a file has been uploaded on the server itself.
 
Old 09-27-2007, 10:28 AM   #3
dgr
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Original Poster
Rep: Reputation: 15
colucix,
Hello. I'm in the Eastern Time zone, the server's in the same building as I and my coworkers. I just looked at the Date/Time Properties and it's already set to the correct time zone, America/New_York Eastern Time. There's a check box in the window for System clock uses UTC and it's currently unchecked. Should I check that box? If I do, will that fix this FTP 4 hour time offset problem? And will it stay set to our EST time?
thanks,
david
 
Old 09-27-2007, 11:27 AM   #4
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Hello, david. No, if you set UTC on the server now, it will be difficult to understand where the time lag comes from. Indeed, I guessed the time was already UTC on the server. Anyway, if you reside in EST timezone the offset from UTC is exactly 4-hours (at least during the daylight saving time) so there should be a similiar issue somewhere on the local network. Can you post simply the output of date from the server and from one of the desktops, if you don't mind?
alex
 
Old 09-27-2007, 11:43 AM   #5
dgr
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Original Poster
Rep: Reputation: 15
alex,
hello,

I ran a terminal on the server typed date and it sayd
Thu Sep 27 11:39:54 EDT 2007

I then went through a terminal program on one of the desktops, got to a # sign, typed date and it gave the exact same time, just off by the several seconds it took me to get to the # sign.

No difference in time seen in the terminal windows, just the four hour offset when you use a ftp program to communicate with the server from a desktop.

thanks,
david
 
Old 09-27-2007, 12:03 PM   #6
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Ok, I think this is an issue with the ls command which is performed from the FTP client when looking at remote files. Is the ftp running in a chroot area? Usually this comes out when there is no timezone info under the chroot environment. Maybe you can find some useful information in the documentation of the running ftp daemon. Which is it, anyway?
alex

Edit: for example the following quote is from vsftpd.conf man page:
Quote:
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

Last edited by colucix; 09-27-2007 at 12:06 PM.
 
Old 09-27-2007, 02:12 PM   #7
dgr
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Original Poster
Rep: Reputation: 15
colucix,
hello, thanks for the help you've given so far.
vsftpd is what's running as a service on our RH Linux server. What you were saying about turning on use_localtime makes sense to fix the 4-hour offset issue...my next question is where do I edit that setting so use_localtime is always on if the server has to reboot and can I turn it on while the service is currently running?
thanks,
david
 
Old 09-28-2007, 08:24 AM   #8
dgr
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Original Poster
Rep: Reputation: 15
can anyone help me with this issue?
thanks in advance,
david
 
Old 09-28-2007, 08:45 AM   #9
colucix
Moderator
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
Hi david, here I am again. The default location for the vsftpd configuration file is
Code:
/etc/vsftpd.conf
but some Red Hat versions put configuration file in
Code:
/etc/vsftpd/vsftpd.conf
I'm not sure if it is necessary to let the changes take effect, but probably you have to restart the vsftpd daemon, as in
Code:
/sbin/service vsftpd restart
 
Old 09-28-2007, 01:37 PM   #10
I_like_TUX
Member
 
Registered: Sep 2007
Distribution: Fedora 7, Edubuntu
Posts: 35

Rep: Reputation: 15
Not sure about which RH Linux you have, enterprise or Fedora? but for Fedora, the location of the configuration file is: /etc/vsftpd and is called vsftpd.conf

I would suggest (the following works for my Fedora 7):

1. backup your current working vsftpd.conf, like:
$ cp vsftpd.conf vsftpd.conf.old

2. add the line "use_localtime=YES" at the end of the vsftpd.conf file, a few additional comments will be great.

3. restart the service:
$ /etc/rc.d/init.d/vsftpd restart

4. login to ftp and see the time is now local time.

If you mess up, just rename vsftpd.conf.old back to vsftpd.conf and restart the service.

Last edited by I_like_TUX; 09-28-2007 at 01:44 PM. Reason: additional information
 
Old 10-09-2007, 06:42 AM   #11
Acelduma
LQ Newbie
 
Registered: Oct 2007
Location: Salt Lake City, Utah USA
Distribution: Fedora 7 ...for now
Posts: 10

Rep: Reputation: 0
Are You Using NTP ?

If you are using Network Time Protocol (NTP) then your system clock is being
synchronized to a time standard that is providing time in UTC format.
In this case you should check the box in the window for System clock uses UTC.

Cheers, Ray.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
system time goes ahead....even with NTP rimvydazas Linux - Server 7 09-02-2007 04:45 AM
Yast Time clock OK, but Desktop is off by 6 hours Cherock Linux - Newbie 1 10-29-2006 12:14 PM
FC5 light blue stripes all over the desktop from time to time SofNine Fedora 8 05-10-2006 09:48 PM
Time stamp in Samba is 11 hours behind time stamp in Linux Linh Linux - General 3 09-04-2003 01:44 PM


All times are GMT -5. The time now is 07:21 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration