LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync dirs w/o o+x perms (as root) (https://www.linuxquestions.org/questions/linux-software-2/rsync-dirs-w-o-o-x-perms-as-root-730542/)

guttersnipe 06-03-2009 09:12 PM

rsync dirs w/o o+x perms (as root)
 
Hello linux gurus,

I've just setup a multi-terrabyte, opensolaris, zfs box, and I'm backing up the *entire* contents of some old IDE disks to my new raidz. I'm issuing these backups from a client computer to the opensolaris server using rsync.

However, I've run into a bit of a problem. Every time rsync comes across a directory which doesn't have execute permissions for "other," it issues a "Permission denied" error:

Code:

# rsync -rvz <from> <to>
sending incremental file list
rsync: recv_generator: failed to stat "<to>/<dir>/<file>": Permission denied (13)
...
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1040) [sender=3.0.5]
#

...where <dir> is the directory without execute permissions for "other" (specifically, they're 770).

I understand _why_ this is occurring. rsync cannot copy the files inside of the directory because it doesn't have permission to _access_ that directories' contents. What I _don't_ understand is why this error is occurring when I execute the rsync command as root!

The only solutions I found on google were to give the directory execute permissions for the "other" group, but I'd like to keep the backup 100% the same as the original--without changing the permissions of the files.

Is there a way to allow rsync to recursively copy all directories and their file contents'--including those directories without execute permissions for "other"--(as root) while also retaining all permissions of the source files and directories?


TIA

abolishtheun 06-03-2009 11:36 PM

Do you have the remote server mounted via NFS? If so, by default root is 'squashed' by the NFS server, for security purposes, and its being mapped silently to (I think) nobody or some other unprivileged user.

guttersnipe 06-04-2009 10:54 PM

Quote:

Do you have the remote server mounted via NFS? If so, by default root is 'squashed' by the NFS server, for security purposes, and its being mapped silently to (I think) nobody or some other unprivileged user.
No, I am not using NFS on any machines on my network. Does anyone have this issue with good-ole rsync with its built-in ssh functionality?


All times are GMT -5. The time now is 02:35 AM.