[lug] cp -p to Fat32 partition

Todd Ruskell truskell at mines.edu
Thu Nov 25 06:28:36 MST 2004


It seems like this should be simple, but I've googled without success, finding
only one post describing the same problem, but no solution.

I have a FAT32 partition mounted as follows:
/dev/hda1   /mnt/windows   vfat   default,auto,users,exec,umask=000 0 0
That has owner and group root.  This partition is also shared out to other
machines via samba.

When I try to cp any file to /mnt/windows as a normal user, the timestamp is not
preserved.  When I try to 'cp -p' I get
cp: preserving times for `/mnt/windows/anyfile': Operation not permitted
I get the error even after making my normal user a member of the group 'root'. 
But when I 'cp -p' as root, timestamps are preserved (ownership is not, as
expected on a vfat partition).  

Now, if my normal user mounts a vfat CF or SD card, so that the CF or SD
directory is owned by the normal user, timestamps are preserved, no problem,
even without using the -p flag.

So obviously this is some kind of feature related to directory ownership.  Is
there some way around this so that any user on my system can cp to my
/mnt/windows directory while preserving timestamps?  And can I make it work
with a GUI like konqueror or nautilus without making these apps setuid root?

Thanks in advance.

Todd

-- 
Dr. Todd G. Ruskell                         Phone: 303-384-2080
Lecturer, Department of Physics             FAX:   303-273-3919
Colorado School of Mines
Golden, CO 80004



More information about the LUG mailing list