File modification dates changed in Ubuntu 8.04 on copy or move - Adventures in Switching to Linux

Tuesday, May 20, 2008

File modification dates changed in Ubuntu 8.04 on copy or move

Before upgrading from Ubuntu 7.10 to 8.04, I had the annoying problem of file modification dates getting changed when copying files to an NTFS file system. I also found that the problem was fixed in a newer version of ntfs-3g and all I had to do was get the package from the Ubuntu backports repository. Yipee!

But now I am running Ubuntu 8.04 and the problem has returned just in a new and nastier form. Now file modification dates are always updated in any move or copy, including ext3 to ext3! I did find that I could get around this problem when copying from the command line with cp using the -p switch to "preserve the specified attributes (default: mode, ownership, timestamps), if possible additional attributes: context, links, all". That didn't work for me when copying to an ntfs partition though. I got an error message: cp: preserving times for `/path/My Documents in Windows/testfile.zip': Operation not permitted

I could (and did) use sudo to make it work on ntfs though. I am glad there is a work around but I really do not want to have to drop to a command line every time I want to move or copy a file that I want the modification date preserved. I want to use Nautilus to drag and drop things!

I knew from my previous issue with ntfs that the copy command doesn't preserve the modification date by default but copying in Nautilus did and now it doesn't. There was a major change from 7.10 to 8.04 with the file system though. GNOME now uses GVFS instead of GnoneVFS (confusing similar names I know). And from my research, it looks like that is the problem. There are bug reports here (Ubuntu) and here (GNOME). Now let's hope it gets fixed for 8.04 and soon! Until then I guess I will be dropping to the command line to move my photos around, argh!

6 comments:

Martin Vogel said...

When I discovered this bug yesterday, several hundred digital photos of mine already had lost their creation date and time in copying processes during the last weeks. Luckily, there is a useful little tool to recover the files date and time from the EXIF information:
jhead -ft *.JPG

Forrest said...

Martin,
Thank you for pointing that out! I haven't looked very hard for a program that would do that for me but it looks like jhead is perfect! I still have some pictures that need fixing from my problem with this before.

Anonymous said...

For me, this is a great problem too and I hope some day will be fixed. Meanwhile I'm using Gnome-Commander and datestamps are preserved.

REDunbar said...

I have to deal with lots of photos that don't have exif dates, so I have to go by their modification dates to keep track of them. Has this been reported as a bug, so that it can be fixed? I installed Gnome-Commander, but after looking at it, it doesn't feel right. I want to be able to drag and drop from normal Nautilus windows. This needs to be fixed ASAP!

Martin Vogel said...

The Bugfix rushes in as fast as a glacier. In the meantime I avoid nautilus and use Thunar as my file manager: http://thunar.xfce.org

Technical Tony said...

This is still a problem in Ubuntu 8.10, good god...