[Samba] Timestamp problem
Guillermo
ggomez at neotechgw.net
Mon Oct 18 14:14:59 GMT 2004
Listing with -a
bash-2.03# ls -al
total 20096
drwxrwxrwx 2 dcenter hermes 13312 Oct 18 09:48 .
dr-xr-xr-x 13 dcenter hermes 512 Oct 14 17:03 ..
-rwxr--r-- 1 jblanco hermes 30 Oct 18 2004 22626.log
-rwxr--r-- 1 jblanco hermes 503011 Oct 18 2004 22626.pdf
See the different timestamps, first two entries (local and parent dir)
have timestamps with "hour stamp" in the ls command output.
The third and fourth entries do not shows hour stamp but only the date.
Our application "sees" the same problem and do not process the files
(the files has to have "complete timestamps" in order to be processed).
Those file were created just copying and pasting in a Windows machine in
our network to our Samba server.
Previously we were using ftp as the method to upload the files without
this issue so even considering i might not be completely understanding
what's going on, it's a Samba 3 file creation issue in my Solaris 8.
I really appreciate any help on this topic since the Samba is already in
production and users are complaining already.
regards
Guillermo
On Wed, 2004-10-13 at 06:10, Mac wrote:
> >
> >Hi
> >
> >When new files or copied files are putted in a Samba share (3.0.2
> >Solaris) from Win clients, it has no time stamp, only date stamp,
> >example:
> >
> >-rwxr--r-- 1 me me 740762 Oct 11 2004 test.jpg
>
> This looks like an 'ls' command.
>
> Also, you have a slight misunderstanding of UNIX timestamps.
>
> Every file has a full time stamp with time and date. However,
> the 'ls' command shows the time stamp in one of two different ways:-
>
> either 'Mon DD YYYY' or 'Mon DD HH:MM'
>
>
> It chooses the second form if the file has been modified within
> the last three months. It chooses the first form (with the year)
> if the file's modification time is not within the last three months.
>
> The important thing here is that when the time stamp on a file is _ahead_
> of the current time, then the 'within the last three months' test fails.
>
> I'll bet that you file has a timestamp that's further ahead in time than
> the system clock of the server you ran the 'ls' command on.
>
>
> Here's a rough timeline ('the past' on the left, 'the future' on the right)
>
>
> <------------+--------+--------+--------N------------->
> 3 2 1 o
> w
>
> |--------------------------|
>
>
> The number represent months. The lower line is the period for which
> 'ls' will display the 'Mon DD HH:MM' format. I think the timestamp
> on your file is to the right of 'Now'.
>
>
> There's various things you can do to check this. If your OS has
> a command 'stat' then that will show you all the timestamps in full detail.
>
>
> Or you can use the 'stat' function in perl maybe, or the stat(2) system call.
>
> Or, you can wait for a few hours, until the time on your server "catches up"
> with the timestamp on the file and then 'ls' will display what you're
> looking for.
>
> Remember all of this does not in any way affect the actual timestamp,
> just the way 'ls' presents it to you.
>
>
>
> The underlying problme is almost certainly one of time-syncing. Or TimeZone
> differences. Have a look at all of them. And have a look at the timestamp
> from a client machine too.
>
>
>
>
> Mac
> Assistant Systems Adminstrator @nibsc.ac.uk
> dmccann at nibsc.ac.uk
> Work: +44 1707 641565 Everything else: +44 7956 237670 (anytime)
More information about the samba
mailing list