System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Time stamp problem when doing ftp

Waqar Razi
Regular Advisor

Time stamp problem when doing ftp

I have a customer running RHEL 5.1. They transfer some files to the server using ftp. The transferred files have incorrect time stamp problem. I have checked the system date and time and they are correct. But when they put some files on the server, they have incorrect time stamp. Can any one please give me some clue.
3 REPLIES
Steven E. Protter
Exalted Contributor

Re: Time stamp problem when doing ftp

Shalom,

Consider using RHN to update to RHEL 5 update 3.

Consider using ntp to keep system time up to date down to the second.

Neither will definitely solve the problem but it eliminates a possible cause of the issue.

You may have your server configured to preserve permissions. This is actually common and there could be a problem with the date/time stamp on the source system.

Consider using ntp on the source system and check the date/time stamp prior to transmitting them via ftp.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Waqar Razi
Regular Advisor

Re: Time stamp problem when doing ftp

How can I check if the server is configured to preserve permissions.
Steven Schweda
Honored Contributor

Re: Time stamp problem when doing ftp

> [...] The transferred files have incorrect
> time stamp problem. [...]

Define "incorrect".

FTP does not normally preserve file date-time
(or ownership, or permissions, or ...).

> You may have your server configured to
> preserve permissions.

I don't understand how an FTP _server_ can
preserve anything.

> How can I check if the server is configured
> to preserve permissions.

See above.


Some FTP clients (like, say, wget) can, as an
option, try to capture some of these data
from a directory listing, and then set the
attributes accordingly on a fetched file,
but, given the unfortunate format of a
typical UNIX(-like) "ls -l" directory
listing, the results are often sub-ideal.

If you _really_ want the file attributes at
the destination to match those at the source,
then you should probably use "tar" or Zip
(or something) to preserve those attributes,
and use FTP to transfer the archive instead
of individual files. Then you'll have the
attributes available when you extract the
files from the archive at the other end.