LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-03-2009, 09:12 PM   #1
guttersnipe
LQ Newbie
 
Registered: Jun 2007
Distribution: Gentoo, Ubuntu
Posts: 25

Rep: Reputation: 0
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
 
Old 06-03-2009, 11:36 PM   #2
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183

Rep: Reputation: 31
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.
 
Old 06-04-2009, 10:54 PM   #3
guttersnipe
LQ Newbie
 
Registered: Jun 2007
Distribution: Gentoo, Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 0
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?
 
  


Reply

Tags
copy, directory, error, permission, rsync, sync



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rsync error: errors selecting input/output files, dirs (code 3) at main.c(323) cucolin@ Linux - Networking 4 09-17-2020 02:03 PM
Why are /mnt /media perms: root root? Stroker Slackware 10 04-25-2008 11:50 PM
Rsync changing owner of dirs Harlin Linux - Security 1 03-30-2007 01:11 PM
root can access a partition and see owners/groups/perms, user gets question marks lurko Debian 2 10-05-2006 11:30 AM
ppp as non root w/o changing perms (slackware) xmnemonic Linux - Networking 0 08-02-2003 01:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration