Get the App
SLTechnology News&Howtos  ›  Servers  › 

What if the time difference of Linux VPS vsftp/proftpd FTP is eight hours?

Shulou Source: shulou.com Published: 2022-06-01 06:37:57 09月17日 Update

Editor to share with you how to do the Linux VPS vsftp/proftpd FTP time difference of eight hours, I believe most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!

First, correct the VPS time zone setting:

First, you need ssh to log in to vps or the server:

Date can view the time and time zone. Then:

Rm-rf / etc/localtimeln-s / usr/share/zoneinfo/Asia/Shanghai / etc/localtime

Date again to see if the time is right. If it is correct, then OK is done.

Example of SSH operation:

[root@deepvps.com~] # dateTue August 31 03:07:52 UTC 2010 [root@deepvps.com~] # rm-rf / etc/localtime [root@deepvps.com~] # ln-s / usr/share/zoneinfo/Asia/Shanghai / etc/localtime [root@deepvps.com~] # dateTue August 31 10:07:52 CST 2010

If there is still something wrong, then you need to correct the time with the command ntpdate stdtime.sinica.edu.tw.

Ntpdate stdtime.sinica.edu.tw if prompted without this command, then you need to install ntpdate first

Centos installation method: yum-y install ntpdate ntp

Ubuntu installation method: sudo apt-get install-y ntpdate ntp

After calibration, if the time is still wrong, then it is another problem. If it is linux vps, then it may be that the time of the parent server is wrong and there is no way out.

Second, modify the FTP software configuration:

The proftpd is modified as follows:

find

/ usr/local/proftpd/etc/proftpd.conf or / etc/proftpd.conf

Open it with vi

Vi proftpd.conf

find

UseReverseDNS off

Add the following (do not use GMT time):

TimesGMT off

Press the ESC key to execute the following save command

: wq

Restart proftpd

/ etc/init.d/proftpd restart

The vsftp is modified as follows:

Edit vsftpd.conf

Vi / etc/vsftpd/vsftpd.conf

Join at the bottom

Use_localtime=YES

Or use_localtime=NO was previously set to

Use_localtime=YES

Press the ESC key to execute the following save command

: wq

Restart proftpd

/ etc/init.d/vsftpd restart

Tips for solving a small problem: after the vsftp has been modified, the FTP time of deepvps has been displayed incorrectly. Check the modification method carefully and find no error. Later, I found a friend to test, and his FTP showed normal. As soon as I thought that it might be the problem of FTP software, the Cuteftp test was normal. Later, I carefully checked my commonly used FlashFXP and found that there was a time zone option that was not selected correctly. The local client flashfxp time zone option requires that you select the same server time / use server time.

The above is all the contents of the article "what to do with the eight-hour time difference in Linux VPS vsftp/proftpd FTP". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Time no command time zone server service method article question hour what to do time difference content that is software face-to-face prompt check test Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Docker Linux Shulou Information macOS