LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Heeelp! How to preserve file date modification attribute (https://www.linuxquestions.org/questions/slackware-14/heeelp-how-to-preserve-file-date-modification-attribute-307764/)

Slackovado 03-30-2005 08:28 AM

Heeelp! How to preserve file date modification attribute
 
Heeelp! How to preserve file date modification attribute
Ok, I've tried everything.
Google didn't help much either.
The BIG problem:
When I copy files from my FAT32 partition into my Linux partition (Raiserfs) the file modification date is fine.
But when I copy files the other way, from my Linux partition to the FAT32 partition with any graphical tools like Konqueror, Emelfm etc., then the file modified attibute changes to the time the file was copied.
Also, when using the cp -p command, it makes no difference. I get the error:

cp: preserving times for `<copied file name here': Operation not permitted
and the file is copied but with date changed.

I'm beginning to understand that the problem is permission based. Because "root" owns the fat32 partition, and when I copy the file as a regular user then the permissions are not right.
I suppose setting 'me" to the owner of the fat32 partition would resolve the problem.
BUT, then I'm reducing a multi-user system to a single-user system. Because other users (not that there are any right now) will get their file attributes trashed if they copy their files to the fat32 partition.
I need to keep file modification dates for my invoices, to be able to quickly tell when I had sent that invoice out.
When I copy the invoices (and any files for that matter) onto the fat32 partition as a backup, the dates get changed to current date (I found that out, to my horror, when copying all my data files before upgrading to Slack 10.1) and my data files are screwed when it comes to the dates.

My fstab entry for the fat32 partition:
/dev/hdb6 /mnt/h vfat auto,users,umask=000 1 0

When I use the ummask=000 then any user can write to the partion but dates get trashed.
If I don't use the umask then dates get preserved if I use the cp -p (or Midnight Commander with preserve attibutes checked) but then regular user who is not the owner of the fat32 partition can't copy files there.

Another situation that comes into play is with Samba.
I have the fat32 partition shared with Samba too, so I can access it from my other Slack box and from my Slack laptop.
So how does Samba affect the file attributes? Any special settings for the shares to preserve the file attributes.

If anyone has any solutions or insights into this, please help me.
I've read through the Samba manual but couldn't find anything that would give me any definitive clues.
And man fstab and man mount are not very helpfull at all.
This situation realy kills my productivity.

Basicaly, MY GOAL is to have REGULAR USERS COPY FILES to and from the FAT32 PARTITION(S) with file MODIFICATION ATTRIBUTE (in particular file modified DATE) PRESERVED.

Thank You.

macemoneta 03-30-2005 09:36 AM

The problem is (as far as I know) the FAT32 filesystem does not have a "modification date", only a creation date. As a result, copying the file to a FAT32 creates it, and sets the date to the current date. What you are asking for is to have the modification date mapped to the creation date on a copy, which isn't something "normal".


All times are GMT -5. The time now is 04:30 PM.