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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
09-27-2007, 08:52 AM
|
#1
|
LQ Newbie
Registered: Aug 2007
Posts: 25
Rep:
|
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
|
|
|
09-27-2007, 09:15 AM
|
#2
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
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.
|
|
|
09-27-2007, 10:28 AM
|
#3
|
LQ Newbie
Registered: Aug 2007
Posts: 25
Original Poster
Rep:
|
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
|
|
|
09-27-2007, 11:27 AM
|
#4
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
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
|
|
|
09-27-2007, 11:43 AM
|
#5
|
LQ Newbie
Registered: Aug 2007
Posts: 25
Original Poster
Rep:
|
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
|
|
|
09-27-2007, 12:03 PM
|
#6
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
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.
|
|
|
09-27-2007, 02:12 PM
|
#7
|
LQ Newbie
Registered: Aug 2007
Posts: 25
Original Poster
Rep:
|
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
|
|
|
09-28-2007, 08:24 AM
|
#8
|
LQ Newbie
Registered: Aug 2007
Posts: 25
Original Poster
Rep:
|
can anyone help me with this issue?
thanks in advance,
david
|
|
|
09-28-2007, 08:45 AM
|
#9
|
LQ Guru
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509
|
Hi david, here I am again. The default location for the vsftpd configuration file is 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
|
|
|
09-28-2007, 01:37 PM
|
#10
|
Member
Registered: Sep 2007
Distribution: Fedora 7, Edubuntu
Posts: 35
Rep:
|
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
|
|
|
10-09-2007, 06:42 AM
|
#11
|
LQ Newbie
Registered: Oct 2007
Location: Salt Lake City, Utah USA
Distribution: Fedora 7 ...for now
Posts: 10
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 02:26 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|