The vsftpd server doesn't show correct timestamp on the files.

Solution Verified - Updated -

Issue

The file /etc/vsftpd/vsftpd.conf is as follows

# cat /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
ftpd_banner=Welcome to Red Hat FTP service.
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES

When some files are created in /usr/newdir

# ll /usr/newdir
total 0
-rw-r--r--. 1 root root 0 Nov 16 23:46 file1
-rw-r--r--. 1 root root 0 Nov 16 23:46 file2
-rw-r--r--. 1 root root 0 Nov 16 23:46 file3
-rw-r--r--. 1 root root 0 Nov 16 23:46 file4
-rw-r--r--. 1 root root 0 Nov 16 23:46 file5
# date
Sat Nov 17 00:01:14 IST 2012

Now when its connected from the client.

$ ftp <IP_OF_FTP_Server>
Connected to <IP_OF_FTP_Server>
220 Welcome to Red Hat FTP service.
Name (<IP>:user): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/usr/newdir"
ftp> ls
227 Entering Passive Mode (10,65,211,17,114,230).
150 Here comes the directory listing.
-rw-r--r--    1 0        0               0 Nov 16 18:16 file1
-rw-r--r--    1 0        0               0 Nov 16 18:16 file2
-rw-r--r--    1 0        0               0 Nov 16 18:16 file3
-rw-r--r--    1 0        0               0 Nov 16 18:16 file4
-rw-r--r--    1 0        0               0 Nov 16 18:16 file5
226 Directory send OK.
ftp> quit
221 Goodbye.
$ date
Fri Nov 16 18:26:06 IST 2012

The timestamp difference can be seen.

Environment

  • Red Hat Enterprise Linux 6
  • vsftpd

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In