Operating System - HP-UX
1833198 Members
3098 Online
110051 Solutions
New Discussion

Re: Unexpected time results with FTP

 
Tommy Brown
Respected Contributor

Unexpected time results with FTP

We have patched and find that our HPUX11.11 FTP server appears correct as to date and time. However, when an FTP user logs in, the time stamps are an hour earlier. Does FTP (WU-FTP current as to patches) use a different variable as to determining "local" time? If so, How do I synch it to the correct local time.. I only have FTP accounts on this server other than root.
Thanks,
Tommy
I may be slow, but I get there !
15 REPLIES 15
Peter Godron
Honored Contributor

Re: Unexpected time results with FTP

Tommy,
could you please give more details as to where you see this difference in time.
When you get the ftp banner ?
Once you have established the ftp connection ?
My first guess would be a TZ difference.
Court Campbell
Honored Contributor

Re: Unexpected time results with FTP

http://www.wu-ftpd.org/wu-ftpd-faq.html#QA21

Look at 7 and 8. Hope that helps.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Tommy Brown
Respected Contributor

Re: Unexpected time results with FTP

thanks for responding Peter,
If I as root(ftp or telnet) do an ls -l of the frp accounts directory, the file listing shows.

-r--r--r-- 1 user group 11898712 Mar 14 15:08 filename

If I FTP as the user, I get.

-r--r--r-- 1 102 104 11898712 Mar 14 14:08 filename

The different time os not of great consequence, just a nuisance.
Tommy
I may be slow, but I get there !
Tommy Brown
Respected Contributor

Re: Unexpected time results with FTP

Thanks Court,
I use the HP SW distribution of the WU-FTP product. I was hoping to correct an env variable rather than recompiling. The sections referred to seemed to deal more with non-HP systems. It will probably clear at the traditional time change.
Tommy
I may be slow, but I get there !
Matti_Kurkela
Honored Contributor

Re: Unexpected time results with FTP

Hmm... does anyone recall whether FTP transfers the timestamps as UTC (or unix time_t) or local time?

If it's UTC, the conversion error might be at the _client_ side.

MK
MK
rick jones
Honored Contributor

Re: Unexpected time results with FTP

I'm reasonably confident the data traversing the FTP control/data connection for an ls/dir command is all ascii, which means you can see it in a tcpdump trace, or a tusc trace with suitable options enabled.
there is no rest for the wicked yet the virtuous have no pillows
rick jones
Honored Contributor

Re: Unexpected time results with FTP

BTW, after the DST patches were installed, was the system rebooted? Or could there perhaps still be an inetd or ftpd process out there with the old tz stuff? (Not sure that TZ would be inherited from inetd though...)
there is no rest for the wicked yet the virtuous have no pillows
James R. Ferguson
Acclaimed Contributor

Re: Unexpected time results with FTP

Hi Tommy:

> Rick wrote: BTW, after the DST patches were installed, was the system rebooted? Or could there perhaps still be an inetd or ftpd process out there with the old tz stuff? (Not sure that TZ would be inherited from inetd though...)

Yes, that would make sense of your observation if you didn't reboot or didn't restart 'inetd' after the DST patch application. The manpages for 'inetd' are very specific:

/*begin quote*/

The Internet daemon and the servers it starts inherit the LANG and TZ environment variables and the umask of the process that started inetd.

/*end quote*/

Regards!

...JRF...
Tommy Brown
Respected Contributor

Re: Unexpected time results with FTP

Thanks for all the responses..
I did patch the system (PHCO_34668 in December 2006)and rebooted it. The problem appears to be with the FTP account. I know telnet users can have a local TZ defined. There are no telnet users except root, as this is an FTP server only. I believe the time of the transaction is UCT and that is why the different time stamps are presented. In this case all accounts are EDT. I was wondering if there is something like /etc/profile for FTP accounts that set up the TZ variable.
Thanks again,
Tommy
I may be slow, but I get there !
Drew Roberts
Valued Contributor

Re: Unexpected time results with FTP

I'm seeing the same issue. 2 users, logging in from the same client checking the creation date of a newly created file. User1 sees the correct time, user2 sees the time - 1 hour.

Have you made any progress on this Tommy?
Tommy Brown
Respected Contributor

Re: Unexpected time results with FTP

Hello Drew,
At least I am not alone in this.. I find that it is not a real problem the way we use the FTP server. Since CRON runs as root and it is correct as to time, all the other time stamps are pretty much irrelevant. I am waiting until the "Normal" EDT date to see what occurs. Maybe then I can back track and see what is goin on.
Tommy
I may be slow, but I get there !
Drew Roberts
Valued Contributor

Re: Unexpected time results with FTP

Same here. Really no impact, other than I'd like to be able to tell my users why they see different times on the files. =)

If you come to any conclusions, please post them here. I'll be sure to do the same.
Tommy Brown
Respected Contributor

Re: Unexpected time results with FTP

Thanks Drew, I will keep this open for a while longer.
Tommy
I may be slow, but I get there !
rick jones
Honored Contributor

Re: Unexpected time results with FTP

I would suspect that if some sort of profile file were being loaded when a user logged-in via ftp, it would be visible in a verbose tusc trace of the inetd which was told to follow forks.
there is no rest for the wicked yet the virtuous have no pillows
Drew Roberts
Valued Contributor

Re: Unexpected time results with FTP

Hey Tommy - I found the solution to my problem. I'm guessing yours will be similar.

The user ID that had the time discrepancy is essentially chroot jailed to the FTP home directory. It utilizes a separate copy of the tztab file that had been copied to it's root to determine time.

This tztab file was of course not updated byt the DST patch.

To fix, I overwrote /ftp/home/usr/lib/tztab with /usr/lib/tztab. Logged back in with the problem user and times are now showing correctly.

Hope it helps!

Drew