lvan6750 发表于 2009-05-02 09:30

关于ftp时间与系统的时间差

When I do “date” command, it is correct …
[ AS2 cronadm@as2 log] $ date
Thu Apr 30 17:43:45 PDT 2009
[ AS2 cronadm@as2 log] $

When I use ftp to put a file to server, the time is not correct …
150 Here comes the directory listing.
-rw-r--rw-    1 102      1000          276 May 01 00:43 bycm997.200904301743.snn
-rw-r--rw-    1 102      1000      1712417 May 01 00:42 hpN867.edi
226 Directory send OK.
150 bytes received in 0.00029 seconds (496.71 Kbytes/s)
ftp> pwd
257 "/u01/cyclone/cyc54/data/5106683500US/ediout"
ftp>

根据上面的情况可以发现,ftp的时间与系统时间相差8小时。
解决方案:
1. 如果是Proftpd,在proftpd.conf 加入 TimesGMT off ,重启proftpd即可。
2. 如果是vsftpd,在vsftpd.conf加入use_localtime=YES,重启vsftpd即可。

风之幻想 发表于 2009-05-04 15:09

原帖由 lvan6750 于 2009-5-2 09:30 发表 http://bbs2.chinaunix.net/images/common/back.gif
When I do “date” command, it is correct …
[ AS2 cronadm@as2 log] $ date
Thu Apr 30 17:43:45 PDT 2009
[ AS2 cronadm@as2 log] $

When I use ftp to put a file to server, the time is not corr ...

好帖子。学习。。。。。。。。。。。

brucewoo 发表于 2009-05-04 21:41

Good

wainje 发表于 2011-03-04 15:06

非常好,看完后搞定。感谢楼主

jerryjzm 发表于 2011-03-04 17:08

咋都是老帖了!
页: [1]
查看完整版本: 关于ftp时间与系统的时间差