LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-18-2004, 04:25 AM   #1
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
"Preserving time: operation not permitted" on fat32 on debian


Hello.
Anytime I give a mv command, or similar, a fat32 partition as destination, I get a "Preserving time: operation not permitted" error, and the file timestamp is set to current time. The same happens when I download with wget to a fat fs. Running mv as root did not solve.
This may seem not much of a problem, still it's annoying when dealing with backups. Does anybody know if it is a kernel limitation, or what?

Thank you in advance
Alessandro

PS: I have kernel 2.4.24 and binutils 2.14.90
 
Old 01-21-2004, 06:27 AM   #2
bhaskie
Member
 
Registered: Jan 2004
Location: New Delhi, India
Distribution: L.F.S 5.0 | FreeBSD 5.2 | Debian sid | Gentoo 2004.0 | Slackware 9.1
Posts: 78

Rep: Reputation: 15
THe kernel is not permitting to change the time stamps. Its not the fault of mv.
WHat mounting flags are you using? Whats the entry in /etc/fstab ???
Are you doing these as root? If not, did you mount the fat32 partition or root?
 
Old 01-21-2004, 10:20 AM   #3
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Original Poster
Rep: Reputation: 30
Here's one of the fstab entries:
/dev/hdc5 /mnt/data2 vfat iocharset=iso8859-15,codepage=850,umask=0 0 0

I can't change timestamps as root, neither.
What I need to know is: is this a known limitation on fat32 writing, or I have some misconfigured kernel options? I actually run a minimally-adapted vanilla kernel.
Thanks
 
Old 01-21-2004, 10:26 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,344

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
it's a limitation.... a standard unix filesystem has so so much information in it than crap old fat32... that's why there's the "quiet" option for vfat in fstab.. so it doesn't keep giving these futile error messages.
 
Old 01-31-2004, 09:13 AM   #5
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Rep: Reputation: 15
My current config allows setting the time correct time stamp on the fat partition. for root and ONE user:

As FAT lacks many of the Unix file attributes (esp. owner, group, r/w-attributes) this information is substituted when mounting a fat file system. By default user-id and group-id are 0 (root) and the r/w-attributes are derived from the current umask (usually 022). These default values can be changed by the various mount options (uid, gid, usmask, and - since 2.5.43 - dmask and fmask).

What seems to happen is this:

When copying a file to a fat partition, it gets - during its creation - the default (or defined) 'virtual' user, group ids, attributes and the current time stamp.

It seems that only the owner of a file can change its time stamp (except root, of course).

This means, if your own user id does not match the 'virtual' user-id, cp can not change the file date back to file date the source file.

The solution is clear - find out your user id (XXX), mount the partition with uid=XXX, and all the files on that partition belong to you - even the newly created ones. This way cp -a can set the original file date.

This works, of course, only for ONE user (and root).

BTW, if you create a similar setup on an ext3 partition, it shows the same behavior. If user B overwrites a file of user A (because he has appropriate permissions), the resulting file still has the original file stamp.
 
Old 01-13-2007, 04:22 PM   #6
javaunixsolaris
Member
 
Registered: Jan 2007
Location: Colorado
Distribution: Kubuntu
Posts: 47

Rep: Reputation: 15
Quote:
Originally Posted by vimico
My current config allows setting the time correct time stamp on the fat partition. for root and ONE user:

As FAT lacks many of the Unix file attributes (esp. owner, group, r/w-attributes) this information is substituted when mounting a fat file system. By default user-id and group-id are 0 (root) and the r/w-attributes are derived from the current umask (usually 022). These default values can be changed by the various mount options (uid, gid, usmask, and - since 2.5.43 - dmask and fmask).

What seems to happen is this:

When copying a file to a fat partition, it gets - during its creation - the default (or defined) 'virtual' user, group ids, attributes and the current time stamp.

It seems that only the owner of a file can change its time stamp (except root, of course).

This means, if your own user id does not match the 'virtual' user-id, cp can not change the file date back to file date the source file.

The solution is clear - find out your user id (XXX), mount the partition with uid=XXX, and all the files on that partition belong to you - even the newly created ones. This way cp -a can set the original file date.

This works, of course, only for ONE user (and root).

BTW, if you create a similar setup on an ext3 partition, it shows the same behavior. If user B overwrites a file of user A (because he has appropriate permissions), the resulting file still has the original file stamp.
Thanks a lot vimico well said. I have a mounted vfat (0x0B) filesystem. For those of you who don't know how to get your uid it's in /etc/passwd the third field. I then added this line to my /etc/fstab:
Code:
/dev/hdc1            /windows/G           vfat       users,uid=1000,gid=users,umask=0002,utf8=true 0 0
and everything works great!
 
Old 01-13-2007, 05:11 PM   #7
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Rep: Reputation: 15
Quote:
Originally Posted by javaunixsolaris
Thanks a lot vimico well said. I have a mounted vfat (0x0B) filesystem. For those of you who don't know how to get your uid it's in /etc/passwd the third field. I then added this line to my /etc/fstab:
Code:
/dev/hdc1            /windows/G           vfat       users,uid=1000,gid=users,umask=0002,utf8=true 0 0
and everything works great!
Hehe... even old answers are new for somebody (the post was nearly 3 years when you found it).

BTW, instead of your numeric ID (uid=1000) you can also use your login name (uid=mike), just as you did with group ID (gid=users).
 
Old 01-14-2007, 08:33 PM   #8
javaunixsolaris
Member
 
Registered: Jan 2007
Location: Colorado
Distribution: Kubuntu
Posts: 47

Rep: Reputation: 15
Quote:
Originally Posted by vimico
Hehe... even old answers are new for somebody (the post was nearly 3 years when you found it).

BTW, instead of your numeric ID (uid=1000) you can also use your login name (uid=mike), just as you did with group ID (gid=users).
yeah I found that out(; I've also encountered another limitation with FAT32 beyond the usual "no security", and it's making me wonder if it's worth the trouble of having something windows and Linux can share. I'll be forced to change the case on a lot of my files because of this limitation.

-Files must have mixed case for the case to be recognized (What I mean by "recognized" is case-difference visible in "ls".).
e.g. in Linux I cannot make a folder with "A" it will be recognized as "a".
blade:/windows/H/tmp # mkdir A
blade:/windows/H/tmp # l
total 48
drwxrwxr-x 3 me users 16384 Jan 14 19:13 ./
drwxrwxr-x 7 me users 16384 Jan 14 19:13 ../
drwxrwxr-x 2 me users 16384 Jan 14 19:13 a/
blade:/windows/H/tmp # mkdir a
mkdir: cannot create directory `a': File exists
blade:/windows/H/tmp # mkdir aBBc
blade:/windows/H/tmp # l
total 64
drwxrwxr-x 4 me users 16384 Jan 14 19:13 ./
drwxrwxr-x 7 me users 16384 Jan 14 19:13 ../
drwxrwxr-x 2 me users 16384 Jan 14 19:13 a/
drwxrwxr-x 2 me users 16384 Jan 14 19:13 aBBc/ <= CAN see the case difference when you have mixed case
blade:/windows/H/tmp # mkdir AbbC
mkdir: cannot create directory `AbbC': File exists <= BUT still can't create two different case folders
blade:/windows/H/tmp #
Adding numbers makes no difference 10cc is the same as 10CC, and in Linux it is seen as "10cc" no matter how you try to make it. This might be a BUG in the "mount vfat" because I think in windows "a" vs "A" is different visually (or "recognized", you still can't create an "a" and "A" in the same folder).
I've tried about every combination from "man mount" I about to try -o posix but I doubt that will give me the ability to make a dir with capital 'A'.
 
Old 01-15-2007, 03:41 AM   #9
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Rep: Reputation: 15
I found a thread with a related question:

http://www.linuxquestions.org/questi...d.php?t=304167

I tried the "mixed" option and it seems to work. I can create a directory named "A".

The original FAT only supported 8.3 filenames with no lower case. When support for longer names and mixed case were added, the 8.3 filename (short name) was still kept for compatibility reasons. (The short version of long filenames ofter contained a "~").

I presume that this option specifies how the module should handle filenames that fit into the 8.3 format and wouldn't need a long filename entry.
 
Old 01-15-2007, 08:10 PM   #10
javaunixsolaris
Member
 
Registered: Jan 2007
Location: Colorado
Distribution: Kubuntu
Posts: 47

Rep: Reputation: 15
Quote:
Originally Posted by vimico
I found a thread with a related question:

http://www.linuxquestions.org/questi...d.php?t=304167

I tried the "mixed" option and it seems to work. I can create a directory named "A".

The original FAT only supported 8.3 filenames with no lower case. When support for longer names and mixed case were added, the 8.3 filename (short name) was still kept for compatibility reasons. (The short version of long filenames ofter contained a "~").

I presume that this option specifies how the module should handle filenames that fit into the 8.3 format and wouldn't need a long filename entry.
Thanks buddy mixed works for me too
Code:
blade:/windows/H/tmp # mkdir A
blade:/windows/H/tmp # mkdir b
blade:/windows/H/tmp # ll
total 96K
drwxrwxr-x 2 me users 16K Jan 14 19:13 aBBc
drwxrwxr-x 2 me users 16K Jan 14 19:36 Dee
drwxrwxr-x 2 me users 16K Jan 14 19:38 Qee
drwxrwxr-x 2 me users 16K Jan 14 19:38 Pee
drwxrwxr-x 2 me users 16K Jan 15 19:03 A
drwxrwxr-x 2 me users 16K Jan 15 19:03 b
blade:/windows/H/tmp # mkdir B
mkdir: cannot create directory `B': File exists
blade:/windows/H/tmp #
 
Old 01-15-2007, 08:12 PM   #11
javaunixsolaris
Member
 
Registered: Jan 2007
Location: Colorado
Distribution: Kubuntu
Posts: 47

Rep: Reputation: 15
I'm afraid I might have been wasting your time I hear linux writes to ntfs. I knew they were working on it but I guess it's good now.

Just found another weird bug that makes me want to try ntfs. If the file's name is all numbers like ####.mp3 the permissions aren't set correctly on a rsync command. I rsync from a file with 777 (CIFS mounted) to FAT32 and the permissions are set as 745 = really weird. So now everytime I rsync that file it thinks the file is different.

Ok looked into it and writing ntfs was super-beta until recently it is just beta, and apparently a lot of people are using it. I don't have a SuSE RPM I can use but I can manually do it at these sites:
http://fuse.sourceforge.net/
http://www.ntfs-3g.org/

Here's the read-only (and parent of 3G) one that comes with SuSE:http://www.linux-ntfs.org/

Last edited by javaunixsolaris; 01-15-2007 at 10:03 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"creating symbolic link" "operation not permitted" wheni Linux - Newbie 3 05-08-2011 01:36 AM
hdparm -d1 /dev/hda gives me "HDIO_SET_DMA failed: Operation not permitted" elluva Linux - Hardware 7 07-21-2007 03:49 AM
Trouble w/ Users, "Operation not permitted" soupface Ubuntu 3 02-05-2006 11:56 PM
"ioctl: Operation not permitted" (beep media playe) unholy Linux - Software 1 12-18-2004 06:14 PM
tar problem "Cannor utime: Operation not Permitted' l32 Linux - Newbie 1 06-28-2004 05:18 PM


All times are GMT -5. The time now is 02:48 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration