Discussion:
bug#7184: Problems with timestamp on FAT32 directories
(too old to reply)
Steven Lee
2010-10-10 09:06:04 UTC
Permalink
Hello,

On an IOMega 500 GB Home Network Hard Drive with a FAT32 partition, all
of the directories are showing up as "1969-12-31 16:00" (or essentially
no date), but when viewing the directory in Windows Explorer, there is
no problem. It doesn't matter if I use 'mkdir' to create a directory or
create the directory from Windows; the result is the same. Files are
okay. NTFS partitions are okay. I have not seen this issue reported
when searching the Internet. I've using latest Cygwin 1.7.7 release.
Here's a log of what I've done.

$ mkdir tmp
$ ls -ld tmp
drwxr-xr-x 1 Steven None 0 1969-12-31 16:00 tmp

$ touch test.txt
$ ls -l test.txt
-rw-r--r-- 1 Steven None 0 2010-10-10 00:50 test.txt

$ which ls
/usr/bin/ls
$ ls -l /usr/bin/ls
-rwxr-xr-x 1 Steven root 128526 2010-06-25 07:42 /usr/bin/ls

Any idea what could be wrong?

-Steven
Eric Blake
2010-10-11 12:05:54 UTC
Permalink
Post by Steven Lee
On an IOMega 500 GB Home Network Hard Drive with a FAT32 partition, all
of the directories are showing up as "1969-12-31 16:00" (or essentially
no date), but when viewing the directory in Windows Explorer,
Any idea what could be wrong?
There's the issue. FAT is an inherently metadata-poor file system,
which lacks a lot of information. Then Windows mistakenly treats
stat()'s ctime as creation-time instead of change-time. Cygwin MUST
fake timestamps for information that is not present in the native
filesystem, so it's easier to fake the epoch (0 seconds since Jan 1
1970, adjusted for your timezone) than it is to fake any other date. If
you have further questions, you should raise them with the cygwin list,
as there is nothing that coreutils can do about the inherent lack of
information in your filesystem nor with cygwin's choice of how to fake
that information.
--
Eric Blake ***@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
Steven Lee
2010-10-11 13:24:53 UTC
Permalink
Hi Eric,

The change-time information is there as it shows up properly in Windows
Explorer. In addition, files are okay under Cygwin; the problem is only
with directories.

FYI, I want to use rsync under Cygwin to backup files but it's causing
all of my directories to be resetted to the epoch time.

-Steven
Post by Eric Blake
Post by Steven Lee
On an IOMega 500 GB Home Network Hard Drive with a FAT32 partition, all
of the directories are showing up as "1969-12-31 16:00" (or essentially
no date), but when viewing the directory in Windows Explorer,
Any idea what could be wrong?
There's the issue. FAT is an inherently metadata-poor file system,
which lacks a lot of information. Then Windows mistakenly treats
stat()'s ctime as creation-time instead of change-time. Cygwin MUST
fake timestamps for information that is not present in the native
filesystem, so it's easier to fake the epoch (0 seconds since Jan 1
1970, adjusted for your timezone) than it is to fake any other date.
If you have further questions, you should raise them with the cygwin
list, as there is nothing that coreutils can do about the inherent
lack of information in your filesystem nor with cygwin's choice of how
to fake that information.
Eric Blake
2010-10-11 14:29:56 UTC
Permalink
[please don't top-post]
Post by Steven Lee
Hi Eric,
The change-time information is there as it shows up properly in Windows
Explorer. In addition, files are okay under Cygwin; the problem is only
with directories.
But as I already said, this is not a coreutils issue, but a cygwin
issue. If you want it fixed in cygwin, then you need to report it to
the cygwin folks.
--
Eric Blake ***@redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
Assaf Gordon
2018-10-30 07:16:48 UTC
Permalink
tags 7184 notabug
close 7184
stop

(triaging old bugs)
Post by Eric Blake
Post by Steven Lee
The change-time information is there as it shows up properly in Windows
Explorer. In addition, files are okay under Cygwin; the problem is only
with directories.
But as I already said, this is not a coreutils issue, but a cygwin
issue.  If you want it fixed in cygwin, then you need to report it to
the cygwin folks.
With no further comments in 8 years, I'm closing this bug.

-assaf

Continue reading on narkive:
Loading...