- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: ls of ftp and system ls show diffent timestamp
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2012 04:18 PM - edited 02-13-2012 04:20 PM
02-13-2012 04:18 PM - edited 02-13-2012 04:20 PM
ls of ftp and system ls show diffent timestamp
ls of ftp and system ls show diffent timestamp
Basically ls of ftp show the UTC timestamp, whereas the ls of the server show PST time. I have the /etc/TIMEZONE in the PST format and my /etc/profile also read from /etc/TIMEZONE then why the javaapplet and ftp (firefox, filezilla, reflection web) show files in UTC timestamp? I want them to show in the PST zone.
Thanks,
Jason
#uname -a
HP-UX hpsrv1 B.11.11 U 9000/800 587730578 unlimited-user license
# date -u
Tue Feb 14 00:13:29 UTC 2012
#date
Mon Feb 13 16:13:44 PST 2012
# cat /etc/TIMEZONE
TZ=PST8PDT
export TZ
#echo $TZ
PST8PDT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2012 09:52 PM
02-13-2012 09:52 PM
Re: ls of ftp and system ls show diffent timestamp
> Basically [...]
As usual, showing actual commands with their actual output can be
more helpful than vague descriptions or interpretations.
> [...] ls of ftp show the UTC timestamp, [...]
Are you talking about the date-time values shown in a DIR/LIST
listing produced by the FTP server (which?) on your HP-UX system?
> [...] and my /etc/profile also read from /etc/TIMEZONE then why the
> javaapplet and ftp (firefox, filezilla, reflection web) show files in
> UTC timestamp?
FTP clients tend to show the data sent by the FTP server.
> #echo $TZ
> PST8PDT
The FTP server process probably cares more about what's in _its_
environment than it does about what's in _your_ environment.
I don't know where the FTP server gets its environment, and I haven't
tried this, so I know nothing, but if I wished to control its
environment, I'd probably start by writing a shell script which sets the
environment variables as I wished, and then runs the FTP server program.
Then, I'd replace the original FTP server command ("/usr/bin/ftpd ..."?)
in my inetd configuration file ("/etc/inetd.conf"?) with a similar
command which specifies my new script, instead. (Naturally, the script
should pass its command-line arguments along to the actual FTP server
program.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2012 06:31 AM
02-14-2012 06:31 AM
Re: ls of ftp and system ls show diffent timestamp
Hi
Just a check ftp is a insecure service. Try sftp you must configure ssh keys it's easy and secure.
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2012 10:19 AM - edited 02-14-2012 11:00 AM
02-14-2012 10:19 AM - edited 02-14-2012 11:00 AM
Re: ls of ftp and system ls show diffent timestamp
The ftpd daemon is run by inetd so the timezone (variable TZ) for ftpd is the one used to start inetd. inetd is started during the rc script sequence. /etc/TIMEZONE is called as part of the environment setup (/sbin/rc, /etc/rc.config and auto_parms). Something prior to inetd startup may have unset TZ or assigned it the UTC value. If you don't want to troubleshoot the startup scripts, just add the line:
. /etc/TIMEZONE
at the beginnng of the /sbin/init.d/inetd script. Note carefully: there is a period, then space, then the TIMEZONE filename. This is called sourcing the file and will set TZ before inetd starts.
Once you change the /sbin/init.d/inetd script, restart inetd like this:
/sbin/init.d/inetd stop /sbin/init.d/inetd start
And now your ftp listings will be shown in the current /etc/TIMEZONE value.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2012 11:21 AM
02-14-2012 11:21 AM
Re: ls of ftp and system ls show diffent timestamp
Thanks Bill. You nailed it. Now I need to debug the script to find out why and where!