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@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@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
on 5-30-2008 1:39 PM Matt Hyclak spake the following:
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@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
Or if you want to preserve permissions, you will need to use tar or some other archiver.
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@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...
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@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.
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.
# create a 10M empty file dd if=/dev/zero of=disk.img bs=1024 count=10000
# format with ext3 mkfs.ext3 disk.img
# mount image mkdir /mnt/mydata mount -o loop disk.img /mnt/mydata
# read / write files echo "hello world" > /mnt/mydata/hello.txt ll /mnt/mydata
Kenneth
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.
On Fri, May 30, 2008 at 4:37 PM, Robert Moskowitz rgm@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