SFTP Log file name two hours off

A discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
Posts: 5
Joined: Fri Sep 11, 2015 6:46 pm

SFTP Log file name two hours off

Post by Jadon » Thu Feb 01, 2018 4:42 pm

I'm a little stumped on this one. Our SFTP_LOGDIR settings in /<install>/sftp-server.sh are as follows:
# Setup a logfile if not set by the .rc profile
if [[ -z "$SFTP_LOGFILE" ]]
logid=`echo $LOGNAME | tr "[:upper:]" "[:lower:]"`
dte=`date +%j.%H%M%S`
But our log file names are 2 hours behind the creation date, e.g.:

-rw-r--r-- 1 USERIDAB GROUPABC 496 Feb 1 11:09 sftp-server.useridab.032.090939.50794366.log

Any thoughts?

Site Admin
Posts: 1804
Joined: Thu Jul 29, 2004 12:12 pm

Re: SFTP Log file name two hours off

Post by dovetail » Wed Mar 07, 2018 2:40 pm

The z/OS Unix date command uses the TZ environment variable to determine the time zone.
If you don't have this set anywhere (correctly), then you many need to export TZ in your /etc/ssh/sftp-server.rc

Post Reply