chgrp problem

Matt McCutchen hashproduct+rsync at gmail.com
Mon Apr 23 21:34:55 GMT 2007


On 4/23/07, keith.briggs at bt.com <keith.briggs at bt.com> wrote:
> I'm using a comand like
>
> rsync -av directory /media/usbdisk/
>
> to backup to a usb device (on a Fedora 5 machine).   I'm getting 100s of messages like
>
> rsync: chgrp "/media/usbdisk/file" failed: Operation not permitted (1)

I bet the usb device has a FAT filesystem, which can't represent
groups.  Thus, Linux refuses any attempt to change the group of a file
with "Operation not permitted".

> Why is rsync trying to change the group?

Because you used -a, which includes --group, which tells rsync to set
the destination groups to match the source ones.

> How do I fix this?

Add --no-group somewhere to the right of -a to stop rsync from trying
to set the group.

> and then at the end
>
> rsync error: some files could not be transferred.
>
> And is the message at the end correct? - it actually looks like all files were transferrred.

The wording of the message isn't perfect.  What it really means is
"some aspect of some source file could not be represented on the
destination in accordance with the command-line options".  This is
true, because you asked rsync to preserve the group but it failed to
do so.

You mentioned you were making a backup.  If it's important to be able
to recover files with the correct groups, you could (1) create and use
an ext2 or similar filesystem on the usb device, (2) tar the source
files and back up the tar file, or (3) use a program like rdiff-backup
that saves the metadata in an ordinary file in the destination.

Matt


More information about the rsync mailing list