Date: Fri, 31 May 2002 12:54:20 -0400 (EDT) From: Matthew Emmerton <matt@gsicomp.on.ca> To: ertank@softhome.net Cc: freebsd-questions@FreeBSD.ORG Subject: Re: ftp ls shows wrong time Message-ID: <Pine.BSF.4.21.0205311247380.43759-100000@xena.gsicomp.on.ca> In-Reply-To: <courier.3CF79067.00007ED8@softhome.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 31 May 2002 ertank@softhome.net wrote: > Hello to all, > > Before asking here I searched bugs list, google bsd search but can not > find answer to my problem. > > I have a FreeBSD 4.6-RC system. FreeBSD ftp server runs on it. > > When I do an ftp to the machine and ls example result is: > ozlerplastik# ftp localhost > Connected to localhost.com. > 220 ozlerplastik.com FTP server (Version 6.00LS) ready. > Name (localhost:ertank): ftp > 331 Guest login ok, send your email address as password. > Password: > 230- FTP Sunucumuza hosgeldiniz. > 230- > 230- You are wellcome to our FTP Server. > 230 Guest login ok, access restrictions apply. > Remote system type is UNIX. > Using binary mode to transfer files. > ftp> ls > 150 Opening ASCII mode data connection for '/bin/ls'. > total 57 > dr-xr-xr-x 2 0 operator 512 May 2 11:28 bin > ^^^^^ > [snip] > time is 11:28 but when I ls -l the ftp dir the result is: > ozlerplastik# ls -l > total 57 > dr-xr-xr-x 2 root operator 512 May 2 14:28 bin > ^^^^^ > > I do connections over LAN, but one of my friend tested it for me over > internet the result is same. > > My timezone is set to Europe->Turkey. > > I tried some other ftp servers, but they respond really slow although I > use them as locally. (Maybe another problem to solve.) Time is important > for my program in my company. So I can not dismiss it. > > Can anybody know what is the problem? When you connect as anonymous ftp, the server does a chroot() to the anonymous FTP directory for security reasons. Because of this, it cannot access the proper timezone files in /etc and this is why your times are out of whack. What the documentation in 'man ftpd' doesn't say is that you'll need to od this: Create a ~/ftp/usr/share directory, unwriteable by anyone. Then copy the entire /usr/share/zoneino hierarchy to ~/ftp/usr/share/zoneinfo. After doing this, your files should show the proper times. - Matt Emmerton To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0205311247380.43759-100000>