[CentOS] Setting Group owner of files on USB drive

Sat May 31 09:33:05 UTC 2008
Johnny Hughes <johnny at centos.org>

Robert Moskowitz wrote:
> Matt Hyclak wrote:
>> On Fri, May 30, 2008 at 04:37:58PM -0400, Robert Moskowitz enlightened 
>> us:
>>  
>>> I just got a 8Gb flash drive and went to copy a bunch of files onto 
>>> it.  I wanted to perserve everything, so I just took my archiving 
>>> rsync command and altered it to go to localhost:/media/RALLY2/ (name 
>>> of flash drive).  I am getting errors with changing the group owner.  
>>> Huh?
>>>
>>> So I try to just use mkdir to create a directory on the flash drive.  
>>> The directory has a group of root ???
>>>
>>> So I try a chgrp and get:
>>>
>>> [root at mine me]# chgrp me /media/RALLY2/Stuff
>>> chgrp: changing group of `/media/RALLY2/Stuff': Operation not permitted
>>>
>>>
>>> OK why can't I set the group to something other than root?
>>>
>>> ls -lstr /media/
>>> total 4
>>> 4 drwxr-xr-x 3 me root 4096 May 30 16:28 RALLY2
>>>
>>> and of course for /media:
>>>
>>> 8 drwxr-xr-x   3 root root  4096 May 30 16:18 media
>>>
>>>     
>>
>> Most likely the device is formatted as FAT32, which has no concept of
>> permissions.
>>
>> Reformat it, ignore the errors, or modify your rsync command to not 
>> preserve
>> uid/gid.
> Unfortunately, I have to use it on Win systems as well...

You can't expect it to maintain ext3 file permissions in a FAT32 
partition :D

you could use tar, but then the files are not available without untaring.

you MIGHT be able to also use acl permissions and getfacl/setfacl to 
build a permissions file which you can use to reset the permissions and 
still have the files available as normal files on the flash drive.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://lists.centos.org/pipermail/centos/attachments/20080531/674cb39f/attachment-0005.sig>