LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-29-2005, 07:47 PM   #1
Slackovado
Member
 
Registered: Mar 2005
Location: BC, Canada
Distribution: Slackware 14.2 x64
Posts: 281

Rep: Reputation: 57
Angry Heeelp! Preserving file 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. it changes the file modified attribute to the current date and time.

When I try to use cp -p then I get this error message:
cp: preserving times for `<insert file copied>': Operation not permitted

I have a clean install of Slack 10.1 and this is my fstab like for the FAT32 partition:
/dev/hdb6 /mnt/h vfat auto,users,umask=000 1 0

Is there a way to set the permissions on the FAT32 drive so users can copy to it and still preserve the file attributes? I don't mean actuall permissions, just the modified date and tme attribute.

Furthermore, if the FAT32 partiotion is also shared via Samba, how does that affect everything.
I know I could set the file system owner to be the user (me) but then I reduce the whole system to a single user system. I'd like to maintain a multiuser environment.

On the other hand, I can't have files changing dates because if I copy some data, like for example, invoices I sent to my clients, and suddenly thy're all the same date. That's no good. I like to keep the invoice dates as they were created.
If I can't resolve this, then my Slackware is reduced to a web browser and playing Ut2004.
I'll have to do all my work in Windows XP. That would realy suck.
Thanks for any help.
 
Old 03-30-2005, 06:01 PM   #2
Jeebizz
Senior Member
 
Registered: May 2004
Distribution: Slackware 14.2 64-bit with multilib
Posts: 2,423

Rep: Reputation: 646Reputation: 646Reputation: 646Reputation: 646Reputation: 646Reputation: 646
If the fat32 partition is local on your computer, and not a network fat32 partition, there is no reason to have samba write to it, so I am assuming that you are having samba share the fat32 partition on your linux box to other pcs in your network. As far as the preservation of dates and times on the file, I'm not entirely sure, but I am willing to give it a stab, I think that because copying it to a different filesystem, there is a change in date and time created, because of the way reiserfs and fat32 handle data.

One thing you might try, is to create an archive of the files you want to copy over to your fat32 partition, and then extract that particular archive that is on your fat32 partition, that might work, but I don't know, its might be worth a try

Last edited by Jeebizz; 03-30-2005 at 06:03 PM.
 
Old 03-31-2005, 05:16 AM   #3
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
Re: Heeelp! Preserving file modification attribute

Quote:
Originally posted by Slackovado
Is there a way to set the permissions on the FAT32 drive so users can copy to it and still preserve the file attributes?
I don't think so. As you've probably guessed, the FAT filesystem has no concept of file owners, so Linux improvises and gives ownership of every file on a mounted FAT filesystem to one user - root by default. It then stands to reason that you can't modify the timestamp on a file owned by another user...

Quote:
I know I could set the file system owner to be the user (me) but then I reduce the whole system to a single user system.
Is that true? I know nothing of how Samba works, but if sharing a file system owned by root works OK - bar this timestamp problem - wouldn't sharing a filesystem owned by you work OK too?

And if you are going to share it via Samba, does it really need to be a FAT filesystem? The timestamp problem would go away with an ext2 filesystem, of course.
 
Old 04-01-2005, 02:36 AM   #4
Slackovado
Member
 
Registered: Mar 2005
Location: BC, Canada
Distribution: Slackware 14.2 x64
Posts: 281

Original Poster
Rep: Reputation: 57
Thanks Nobber.
You're right, partialy.
You're right because the owner is what causes the problems.
I resolved it, for now, by setting myself as the owner.
However, this is a bad solution, because if another user copies any files to the fat32 drives then the file attributes get trashed.
I'm realy pissed off because I was a good little Linuxer and did all my work in Ooo.org saving the files in my home directory.
Then before upgrading to Slack 10.1 form 10, I "backed up" the files to my fat32 drive and also to have access to them from Windows.
To my horror, all the files were set to the same date and time!!! For most files it wouldn't be a big deal but those were about three years worth of invoices I sent out to my clients. I need to preserve the original date the invoice was created so I can quickly tell when I sent them just by looking at the files without having to open the actuall invoice.
Now the dates are all gone, all set to the same date and time! Fucking pissed me off!
I consider this equivalent to LOSS OF DATA!
There must be a way to set fat32 drives so they are open to all users and nobody is owner just like it's under Windows.
This behavior of Linux with respect to fat32 drives is not a feature, it's a bug!
I had never expected to loose data in Linux. I always trusted it blindly.
I wonder who do I send a bug report to?
And I haven't even gotten to testing this with Samba. I think I'll pull more than a few hair before I get Samba co-operating.
And yes, I do need fat32 drives so I can access my data from both Linux and Windows.
That's why all my data is on fat32 drives so I have access to it from anywhere. It was my own fault for saving the files in my /home, I should've saved them on the fat32 drive in the first place.
I'll be "gun-shy" from now on when copying files between my drives.
Anyway, I'm not very encouraged by the lack of insightfull responses here.
 
Old 04-01-2005, 03:31 AM   #5
Nobber
Member
 
Registered: Jun 2002
Location: Nova Scotia
Distribution: Debian (home), Kubuntu 7.04 (work)
Posts: 265

Rep: Reputation: 30
Quote:
Originally posted by Slackovado
I wonder who do I send a bug report to?
That would be Linus, I reckon. The kernel has final say in what operations are permitted on a filesystem.

If only you could set the sticky bit on a FAT filesystem!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Heeelp! How to preserve file date modification attribute Slackovado Slackware 1 03-30-2005 10:36 AM
what sort of file attribute is this: b--Srws-wt BrianK Linux - General 6 12-18-2004 12:26 AM
%file attribute for RPM SPEC files Brian of Gep Fedora 0 06-15-2004 08:12 PM
file attribute question swmok Debian 2 05-20-2004 01:16 AM
VFAT file attribute SloppyO Linux - General 2 09-11-2001 12:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration