This forum uses cookies. Click X button to hide this message. What is stored? 
Total Commander Forum Index Total Commander
Forum - Public Discussion and Support
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Timezones and file time when FTP uploading
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.5x(a) final bug reports (English) Printable version
View previous topic :: View next topic  
Author Message
rhulsegge
Junior Member
Junior Member


Joined: 11 Apr 2010
Posts: 8
Location: The Netherlands

PostPosted: Sun Apr 11, 2010 1:42 pm    Post subject: Timezones and file time when FTP uploading Reply with quote

Hi,

Multiple times a day I connect to my NAS using TotalCommander FTP. Uploading and downloading works like a Swiss clock Wink
The only thing that I can't get to work properly is the file date of uploaded files. Here in The Netherlands I have Windows set on the GMT +1 Amsterdam timezone. But when uploading files the file time of the uploaded file is shown in GMT time.
E.g. current Dutch time 21:00 hrs; uploaded file time 20:00 hrs.
When I use internet explorer (of course NOT my favourite tool for FTP) the file time of a file uploaded with iexplorer IS in the correct GMT +1 time. Looking to the file through TotalCommander FTP the time is shown in GMT time, so again the hour setback.

I tried several filename coding settings in the FTP connection details box, but nothing helps.

I use Windows 2000 NL SP4 and Windows XP NL SP3, TotalCommander 7.50a. My NAS uses Linux with EXT4 formatting.

Any suggestions how to solve this?
Back to top
View user's profile Send private message
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34310
Location: Switzerland

PostPosted: Mon Apr 12, 2010 2:19 pm    Post subject: Reply with quote

Can you try with TC 7.55 beta (just for testing, separate directory)? It now supports MLSD and can set the time stamp on uploads. Both functions use GMT, so there should no longer be any time zone problem.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rhulsegge
Junior Member
Junior Member


Joined: 11 Apr 2010
Posts: 8
Location: The Netherlands

PostPosted: Mon Apr 12, 2010 3:44 pm    Post subject: Reply with quote

Hi again, thanks for your answer!

I have downloaded 7.55 beta as you suggested, and installed it in a different folder. Copying files works as in 7.50a.

Unfortunately the dates are still wrong on the server. I tred all three states of MLSD but it made no difference.

So back to square one...
Back to top
View user's profile Send private message
Henrie
Member
Member


Joined: 03 Sep 2006
Posts: 188
Location: Volkel, the Netherlands

PostPosted: Mon Apr 12, 2010 4:09 pm    Post subject: Reply with quote

I can reproduce this when I set my NAS back to winter time.
But when i set the date on my NAS to summer time (same time as the Win XP computer I work on) I don't get a time difference.
And because I have activated the function on my NAS to synchronise time with a time server daily it always has correct time when I copy my files to it.
Not a bug in my opinion. Date is set by the NAS FTS system.

Win XP Dutch, with TC 7.55pb2 and Synology DS107+ NAS firmware DSM 2.3-1139
Back to top
View user's profile Send private message
rhulsegge
Junior Member
Junior Member


Joined: 11 Apr 2010
Posts: 8
Location: The Netherlands

PostPosted: Tue Apr 13, 2010 1:41 am    Post subject: Reply with quote

Hi Henri,

Thanks for your input.

My NAS also synchronises automatically with a time server each day. It is set to summertime. Nevertheless the hour time difference exists. When I use internet explorer the file times are ok, but when I use TC the hour time difference occurs.
I have tried my XP SP3 notebook with 7.55b2 but that does not help either.
So all are set to summertime and all synchronize time and date regularly. ie does not have the time problem, so I still think the problem lies in the FTP connection through TC...
Back to top
View user's profile Send private message
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 902

PostPosted: Tue Apr 13, 2010 1:16 pm    Post subject: Reply with quote

When you're connected to NAS, right-click on any file in FTP panel and select Properties. Raw directory listing will open in Lister. Then look for date in the list and you'll see what exactly the server sends to TC. You can try with both MLSD on and off.
Back to top
View user's profile Send private message Send e-mail
rhulsegge
Junior Member
Junior Member


Joined: 11 Apr 2010
Posts: 8
Location: The Netherlands

PostPosted: Sun Apr 18, 2010 2:50 pm    Post subject: Reply with quote

Hi all,

Sob: MLSD on or off does not seem to make any difference here. The time shown in Lister also differs 1 hour.

The NAS that it is all about is a QNAP TS-219P and works fine. The past week I have done some experimenting with connections and file copying:

- I made a network connection in/with Total Commander.
- I copied a file with TC to the NAS.
- File time is now correct.
- I copied another file with TC-FTP to the NAS.
- File time differs 1 hour.
- File time of first copied file also differs 1 hour.
- Both file times show correct in the network connection pane.
- I used both TC 7.50a and 7.55beta and the outcome was the same.
- router: Linksys WRT300N
- PC: W2k NL SP4, wired
- notebook: XP NL SP3, wireless
- NAS: disks use EXT4 format, wired
- My timezone: NL = GMT+1 (Amsterdam, etc.)

My conclusion: the FTP module somehow doesn't take into account either the summertime adjustment or the +1 hour in my GMT+1 timezone.

The hour time difference is very problematic in case of archiving/backing up.

Can anyone tell me is I should change some setting in TC-FTP or if it actually is a bug? And if it is a bug, can/will it be corrected?

Many thanks for your comments.
Back to top
View user's profile Send private message
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 902

PostPosted: Sun Apr 18, 2010 4:36 pm    Post subject: Reply with quote

No difference means that the output:
a) is different, but there's no difference in time
b) is exactly the same -> this would mean that server does not support MLSD at all and TC falls back to using old LIST command

Just to be sure, this is typical output of LIST command on Unix server:
Code:
-rw-r--r--   1 username groupname      712 Mar 22 20:47 somefile.ext

while this is output of MLSD:
Code:
Type=file;Size=712;Modify=20100322204743.000; somefile.ext


I have limited access to one different QNAP model and it does not support MLSD, so I guess b) is correct answer.

This QNAP uses ProFTPd 1.3.1rc2 as ftp server and it has an option for GMT times in directory listing. According to ProFTPd manual it's on by default for version >= 1.2.0pre9. It should be off, because it's the usual for LIST command. I'm not sure if all QNAPs have the same software, but lets hope they do. Look for proftpd.conf (/mnt/HDA_ROOT/.config/proftpd.conf in my case) and check for TimesGMT option. If it isn't there, add the line "TimesGMT off" and restart ftp server. Check after restart, that the change is still there, just to be sure.
Back to top
View user's profile Send private message Send e-mail
ghisler(Author)
Site Admin
Site Admin


Joined: 04 Feb 2003
Posts: 34310
Location: Switzerland

PostPosted: Tue Apr 20, 2010 10:23 am    Post subject: Reply with quote

2rhulsegge
Please press Alt+Enter during a connection to see the raw directory listing. Then compare it to what Sob described to check whether the NAS supports MLSD or not.
_________________
Author of Total Commander
http://www.ghisler.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
rhulsegge
Junior Member
Junior Member


Joined: 11 Apr 2010
Posts: 8
Location: The Netherlands

PostPosted: Tue Apr 20, 2010 11:48 am    Post subject: Reply with quote

Pressing Alt+Enter shows what Sob calls the "old LIST command", so the answer is b).

That is the easy part for me. I have no problems to understand the ProFTP alinea, but my technical knowledge how to connect to the QNAP, find the folders Sob talks about and let alone to change the conf file is limited.

I know you can use Telnet or (?) SSH but I don't know these programs. So I need help in that area too I'm affraid...
Back to top
View user's profile Send private message
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 902

PostPosted: Tue Apr 20, 2010 7:24 pm    Post subject: Reply with quote

Lets start with the easy and safe part. Download PuTTY, the SSH client (putty.exe from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). Run it and connect to your NAS. Just enter it's address in "Host Name (or IP address)" field and press Open (SSH and port 22 should be selected by default). New black window will open and ask for username and password. The username should be "admin" and password your main administration password. If login succedes, you should see command prompt:
Code:
[~] #

Try if the config is in the same path as mine:
Code:
ls /mnt/HDA_ROOT/.config/proftpd.conf

If not, find it:
Code:
find / | grep proftpd.conf

When you have the correct location, look at it's content:
Code:
cat /mnt/HDA_ROOT/.config/proftpd.conf

Or just grep for the variable:
Code:
grep GMT /mnt/HDA_ROOT/.config/proftpd.conf

If you get nothing or "TimesGMT on", then server uses GMT time for listing and TC does not expect that. Setting "TimesGMT off" should solve it.

Now comes the harder part. There seems to be only one text editor available on QNAP and it's "vi". And vi is very user unfriendly.
First, make a backup of current config:
Code:
cp /path/to/proftpd.conf /path/to/proftpd.conf.backup

If you somehow manage to destroy the config file, you can go back to original, just swap the arguments:
Code:
cp /path/to/proftpd.conf.backup /path/to/proftpd.conf

Then it's your choice:

1) Find some nice tutorial how to use vi (personally I hate that thing so much that I learned only how to exit from it ;)
2) Copy the config file somewhere else, where you can edit it in user friendly editor and then copy it back. You can use SFTP plugin (http://ghisler.ch/board/viewtopic.php?t=19994) to access the entire filesystem of NAS. The editor you use should understand Unix line endings (almost anything better that Notepad should do) otherwise you'll see just one long line.

If you're not sure about anything, just ask.

---
Edit: Before you start changing anything, it's a good idea to do a little research to see if it can be influenced from administration. Do the safe part to be sure that the wrong option is set. I can't help you much with this, because the NAS that I have access to is not mine and I can't mess with it too much. :)
Back to top
View user's profile Send private message Send e-mail
rhulsegge
Junior Member
Junior Member


Joined: 11 Apr 2010
Posts: 8
Location: The Netherlands

PostPosted: Wed Apr 21, 2010 8:57 am    Post subject: Reply with quote

Sob, you explained everything very clear to me, thanks! Here's what I did:

First I tried the putty connection and that worked. After that excercise I also tried the SFTP plug-in for TC and that worked even better! A whole new world opende up on the QNAP.
I navigated to the foldrer you indicated and there is a file called proftpd.conf

The file contains a line "TimesGMT off"

so the TimesGMT setting is already off.

So, how to proceed from here?
Back to top
View user's profile Send private message
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 902

PostPosted: Wed Apr 21, 2010 10:23 am    Post subject: Reply with quote

Funny thing, I just noticed that I can see it here too. :) I'm in GMT+1 and GMT+2 for DST. ProFTPd shows correct GMT+1 times when they're outside of DST. They're the same in ftp listings and shell directory listings. But times in DST are one hour off. E.g. for right now created directory I have 18:20 in shell but 17:20 in ftp listing.
I can't test it here now, but little googling suggests that the magic command to add to proftpd.conf might be:
Code:
SetEnv TZ :/etc/localtime

If it works, then only one problem remains. I'm not sure how QNAP administration handles updates to proftpd.conf (e.g. when changing user settings), so there is a possibility that the change could be lost. In that case I expect that there must be some other way how to set it somewhere as a default, but I can't help you with that. You'd have better chances in some dedicated QNAP forum. I don't really know that much about it. :)
Back to top
View user's profile Send private message Send e-mail
rhulsegge
Junior Member
Junior Member


Joined: 11 Apr 2010
Posts: 8
Location: The Netherlands

PostPosted: Wed Apr 21, 2010 12:24 pm    Post subject: Reply with quote

Hi,

As you suggested I added the line

Code:
SetEnv TZ :/etc/localtime


to proftpd.config

Unfortunately this did not change anything: still the hour time difference.

So I restarted the QNAP to find out if:
- the changes in proftpd.conf will remain or get lost
- if they remain whether this solves the hour time difference or not

Result:
Bummer: the proftpd.conf file is overwritten during rebooting, so the changes are lost.

So now I will try and find out at ProFTP and/or QNAP if they can help.
If they provide the ultimate solution, I will post it here.

Thanks Sob, you have taught me a lot about my NAS, now I am more confident in exploring etc.!
Back to top
View user's profile Send private message
Sob
Power Member
Power Member


Joined: 19 Jan 2005
Posts: 902

PostPosted: Wed Apr 21, 2010 2:06 pm    Post subject: Reply with quote

The ultimate solution is MLSD command because it should always use GMT, so there can't be any confusion. ProFTPd itself does support it (http://www.proftpd.org/docs/modules/mod_facts.html), but QNAP version, at least the one here, does not include it. You can try in shell:
Code:
proftpd --list

So as paying QNAP customer you should ask them nicely about updated version.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Total Commander Forum Index -> TC7.5x(a) final bug reports (English) All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Impressum: This site is maintained by Ghisler Software GmbH

Using phpBB © 2001-2005 phpBB Group