rsync error…

Johnny Rosenberg gurus.knugum at
Mon Jan 5 22:18:19 UTC 2009

I have made a backup from my internal drive to a USB drive with rsync. My
script look something like this:




EXCLUDE="--exclude-from ${EXCLUDELIST}"

# Lot of commands for checking things and let the user select (with Xdialog)
what kind of backup to run.

rsync -auv ${EXCLUDE} "${HOME}" "${BACKUPFOLDER1}/" >> "${LOGBACKUP}"

# Some more commands

This works perfectly well.

The same script is also supposed to be able to restore tha backup. The rsync
command for that is:

rsync -auv "${BACKUPFOLDER1}/${LOGNAME}/" "${HOME}/" >> "${LOGRESTORE}"

As you can see, it's basically the same as the backup one, except we don't
exclude anything.

Now the problems start. When running the script from a console and then
selecting Restore in a dialogue box, I get the following error message:

$ ./Backup
rsync: chgrp
Ubuntu 20080217.ods" failed: Operation not permitted (1)
rsync error: some files could not be transferred (code 23) at main.c(1058)

The file mentioned is actually a soft link to a file with the same name. Its
permissions are "rw-r--r--". I then noticed that all of my other links had
permissions such as "rwxrwxrwx" or at least "rwxr-xr-x", so I thought that
thre could be some kind of special thing about links or something, so I
changed the permissions to "rwxr-xr-x" using Nautilus, but I still get the
same error message. When I lok at the file again after the error message, I
notice that the permissions are switched back to the same status as they
were before I changed them! I try this several times, but each time rsync is
run, the permissions are changed back!

I have several other links to files and to folders, but rsync doesn't have
any troubles with them, it's this particular link ONLY. I can't really see
what's the difference between that link and all the others. Everything is
the same. Permissions, owner, group, everything. However, this particular
one is maybe the only link pointing to an ODF, but I'm not sure about that

And why can I copy that link one direction but not the other?

I can solve this problem by adding the following ahead of the rsync command:

gksudo -user $LOGNAME

However, I think this is an ugly solution and I also need to enter my
password, which shouldn't be necessary for copying my own files wherever I
want them in my very own system.

I can't really see why this doesn't work for that particular link. It
shouldn't shouldn't it?


Johnny Rosenberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-users mailing list