LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags , , , , , , , ,

Reply
 
Thread Tools
Old 06-03-2009, 10:12 PM   #1
guttersnipe
LQ Newbie
 
Registered: Jun 2007
Distribution: Gentoo, Ubuntu
Posts: 20
Thanked: 0
rsync dirs w/o o+x perms (as root)


[Log in to get rid of this advertisement]
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
guttersnipe is offline  
Tag This Post , , , , , , , ,
Reply With Quote
Old 06-04-2009, 12:36 AM   #2
abolishtheun
Member
 
Registered: Mar 2008
Posts: 183
Thanked: 1
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.
abolishtheun is offline     Reply With Quote
Old 06-04-2009, 11:54 PM   #3
guttersnipe
LQ Newbie
 
Registered: Jun 2007
Distribution: Gentoo, Ubuntu
Posts: 20
Thanked: 0

Original Poster
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?
guttersnipe is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Why are /mnt /media perms: root root? Stroker Slackware 10 04-26-2008 12:50 AM
rsync error: errors selecting input/output files, dirs (code 3) at main.c(323) cucolin@ Linux - Networking 3 11-20-2007 05:56 PM
Rsync changing owner of dirs Harlin Linux - Security 1 03-30-2007 02:11 PM
root can access a partition and see owners/groups/perms, user gets question marks lurko Debian 2 10-05-2006 12:30 PM
ppp as non root w/o changing perms (slackware) xmnemonic Linux - Networking 0 08-02-2003 02:03 AM


All times are GMT -5. The time now is 12:58 AM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration