It completely solves the problem of time displayed when accessing the vsftpd server through command lines.

Source: Internet
Author: User
The command line access to the vsftpd server display time is completely solved-Linux Enterprise Application-Linux server application information. The following is a detailed description. This problem was discovered when I helped a friend of a computer company install a vsftpd Server Based on Redhat AS4 for his customers.

Because this customer is a user of a UnionPay system, they have high requirements on application security and stability. When the system is installed and tested, a phenomenon is found. Check the time when a user creates a file on the server side or the time deviation occurred when the client views the file created by the Administrator on the service. The answer is to add use_local_time = YES to vsftpd. conf.

However, after the attempt, a new problem occurs: when the user manually restarts the vsftpd service again, the problem is exactly the same as the original one.

I once again went to the user with my friends and conducted a test. I found a question that has never been mentioned before: do we have any special requirements when starting the vsftpd service? The following is the result of our test. I believe this is a major discovery!

[Root @ localhost ~] #/Etc/init. d/vsftpd restart (everything works normally with this command)

[Root @ localhost ~] # Service vsftpd restart (time error occurred when using this command)

After careful consideration, we decided to introduce the TZ variable in the environment variable, TZ = Asia/Shanghai, and repeatedly tested any of the above commands and returned the correct results.

Analysis: When we use the service command, the root user drives the service and starts vsftpd. In this case, the tz of the root environment variable affects the vsftpd service and produces such a "strange" phenomenon.

Suggestion: At that time, when I installed the system, the language support was English, but the time zone was Asia/Shanghai. If my friends only serve Local users in the future, I would like to select Chinese support.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.