when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime
# 1  
Old 09-17-2010
when users ftp to server the timezone reflected is UTC but the server is set to TZ in localtime

Guys,

Need your help coz my server runs in local time GMT +8, but when client use ftp and login, the resulting timestamp seen in each file is in UTC format. We need to set that the time should be the same as GMT +8 when in ftp session.
I am using RHEL 5.3.

Code:
root@]# ll
total 1740
-rw-r--r-- 1 sc users  2044 Sep 17 16:18 CFSCV00001.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:19 CFSCV00002.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:19 CFSCV00003.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:20 CFSCV00004.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:20 CFSCV00005.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:21 CFSCV00006.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:21 CFSCV00007.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:22 CFSCV00008.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:22 CFSCV00009.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:23 CFSCV00010.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:23 CFSCV00011.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:24 CFSCV00012.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:24 CFSCV00013.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:25 CFSCV00014.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:25 CFSCV00015.DAT
-rw-r--r-- 1 sc users  2044 Sep 17 16:26 CFSCV00016.DAT

Code:
root@]# ftp <hostname>
Connected to <hostname>
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (:root):
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> 
ftp> 
ftp> ls
227 Entering Passive Mode (192,168,50,10,141,170)
150 Here comes the directory listing.
-rw-r--r--    1 101      100          2044 Sep 17 08:18 CFSCV00001.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:19 CFSCV00002.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:19 CFSCV00003.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:20 CFSCV00004.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:20 CFSCV00005.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:21 CFSCV00006.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:21 CFSCV00007.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:22 CFSCV00008.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:22 CFSCV00009.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:23 CFSCV00010.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:23 CFSCV00011.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:24 CFSCV00012.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:24 CFSCV00013.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:25 CFSCV00014.DAT
-rw-r--r--    1 101      100          2044 Sep 17 08:25 CFSCV00015.DAT


Thanks

# 2  
Old 09-17-2010
set this parameter in vsftpd.conf

per the man page.

Code:
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

This User Gave Thanks to frank_rizzo For This Post:
# 3  
Old 09-20-2010
Hi Frank,

Thank you, it works.!
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Implement FTP server on RHEL server without using FTP client

We have RHEL 5.8 in our environment, I had a query whether we can implement an FTP server using vsftpd package and Linux configurations like setsebool without using any external FTP clients like FileZilla etc. I am very confused on this. The FTP functionalities that should be present are download &... (3 Replies)
Discussion started by: RHCE
3 Replies

2. HP-UX

Old crontab file reflected after server reboot

Hi All, We are working on HP_UNIX. I am facing a strange problem regarding crontab in our unix environment.Whenever a server reboot takes place on our server the old crontab gets reflected due to which several scripts which were earlier uncommented starts running causing a huge problem .Is... (6 Replies)
Discussion started by: ammbhhar
6 Replies

3. Ubuntu

Set up a Ubuntu server as a FTP server

Hello, How can I set up a ubuntu server as a FTP server? Thanks, (1 Reply)
Discussion started by: Pouchie1
1 Replies

4. UNIX for Advanced & Expert Users

Log for Timezone change in unix server

There is a unix server where the time zone has been changed from EST to CST.Can we get any kind of log when it was changed anywhere in the unix machine. Also the path for the same. If there is any other way to know this please let me know (3 Replies)
Discussion started by: dr46014
3 Replies

5. Windows & DOS: Issues & Discussions

Office server => laptop =>client server ...a lengthy and laborious ftp procedure

Hi All, I need your expertise in finding a way to solve my problem.Please excuse if this is not the right forum to ask this question and guide me to the correct forum,if possible. I am a DBA and on a daily basis i have to ftp huge dump files from my company server to my laptop and then... (3 Replies)
Discussion started by: kunwar
3 Replies

6. Shell Programming and Scripting

preserving the timestamp of a file when copied from remote server to local server using ftp

Hi, I need to copy few files from remote server to local server. I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the remote directory to my local server with the timestamp of all those files shouldnt be changed. ... (5 Replies)
Discussion started by: arunkumarmc
5 Replies

7. Linux

How to set up FTP Server with Active Directory

I've set up a FTP server (vsftpd) with some local user account and it works fine. Now i want to upgrade this FTP server with an ability that can authorize user through Active Directory. I do a search around our forum and it leads me to this page: Native LDAP, native Kerberos and Windows Server... (0 Replies)
Discussion started by: cthinh
0 Replies

8. Solaris

How to change Timezone without restarting teh server

Hi I have changed my timezone using the command export TZ='Asia/Calcutta" but teh affect is taking place only in teh shell where I am logged in. If I export teh variable when I open the new session, things are fine. Can I affetct the change universally, without restarting the server. ... (2 Replies)
Discussion started by: krishan
2 Replies
Login or Register to Ask a Question