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
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. Matt -- Matt Hyclak Department of Mathematics Department of Social Work Ohio University (740) 593-1263
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...
Filipe Brandenburger
2008-May-31 13:23 UTC
[CentOS] Setting Group owner of files on USB drive
On Fri, May 30, 2008 at 4:37 PM, Robert Moskowitz <rgm at htt-consult.com> wrote:> 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 ??? > > OK why can't I set the group to something other than root?Because it's FAT. If what you want is all the files on the same group, you may use mount options to set that. For example: mount -o group=mygroup /dev/sdx1 /mnt/myusb But if you want commands to change groups or permissions, you should reformat the filesystem. If you need Windows interoperability, you might want to try NTFS, I don't know if it works, but if you have the device, the machines and the time for it, you might as well test it. HTH, Filipe
I want to thank you all for your comments and the knowledge I gained thereby.... Kenneth Burgener wrote:> On 5/31/2008 3:33 AM, Johnny Hughes wrote: >> Robert Moskowitz wrote: >> You can't expect it to maintain ext3 file permissions in a FAT32 >> partition :D > > > Not necessarily. If the Linux files do not need to be accessed from > the windows environment, you could create an image file, format the > image as ext3, mount the image file as a loop device, and treat it as > a standard ext3 mount point.Since this is only a movable copy of files from my /home/me directory structure, I can live with loosing the group and needing to reset it if moved back to a ext3 partition. I will just have to work out the right rsync of cp command to do the bulk movement without all those warnings. SHould only take reading a few man pages for that... Again thanks.