Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rsync permission denied
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Vanecelli
n00b
n00b


Joined: 15 Jun 2008
Posts: 41
Location: Belleville, Ontario

PostPosted: Tue Jun 23, 2009 4:17 pm    Post subject: rsync permission denied Reply with quote

So, I've been scouring the forums (both here and anything Google can find) and have yet to find a solution.
This (run from a cron.daily script)
Code:
$RSYNC -avog --delete /home rsync://root@192.168.0.4/plutohome
gets me this
Code:
sending incremental file list
home/
rsync: recv_generator: mkdir "/home" (in plutohome) failed: Permission denied (13)
*** Skipping any contents from this failed directory ***

sent 4595884 bytes  received 7902 bytes  1841514.40 bytes/sec
total size is 9726994954  speedup is 2112.83
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1040) [sender=3.0.5]
Same error for any folder, if anyone is stuck on the "home" thing. And I just can't Google anymore. And boy do I love migration. :cry:
Back to top
View user's profile Send private message
twork
Apprentice
Apprentice


Joined: 28 Jul 2006
Posts: 176

PostPosted: Wed Jun 24, 2009 8:19 pm    Post subject: Re: rsync permission denied Reply with quote

Vanecelli wrote:

Code:
$RSYNC -avog --delete /home rsync://root@192.168.0.4/plutohome
gets me this
Code:
sending incremental file list
home/
rsync: recv_generator: mkdir "/home" (in plutohome) failed: Permission denied (13)
*** Skipping any contents from this failed directory ***



Why the "rsync://" in the destination path? Is there an rsync server running at the destination system? If so, is it running as root? If not, there's your problem.

I'd skip the rsync server on the receiving end and just do
Code:
$ rsync -avog --delete /home root@192.168.0.4/plutohome

...assuming that there's an ssh server running as root on the remote end.
Back to top
View user's profile Send private message
Vanecelli
n00b
n00b


Joined: 15 Jun 2008
Posts: 41
Location: Belleville, Ontario

PostPosted: Thu Jul 02, 2009 2:26 pm    Post subject: Reply with quote

Sorry for the late response, unscheduled hospital visit.
I did go the SSH route, and got things working, but the work around for the password was annoying.
Does the system not run the scripts as root when you add them with rc-update?
Back to top
View user's profile Send private message
twork
Apprentice
Apprentice


Joined: 28 Jul 2006
Posts: 176

PostPosted: Thu Jul 02, 2009 9:04 pm    Post subject: Reply with quote

Vanecelli wrote:
Sorry for the late response, unscheduled hospital visit.


Ugh.

Vanecelli wrote:
I did go the SSH route, and got things working, but the work around for the password was annoying.
Does the system not run the scripts as root when you add them with rc-update?


Sure it does, but a lot can happen in between the time the init script runs and the moment when services are provided. My first guess was that rsyncd was downgrading to a non-privileged user account after root starts it up, the way a lot of other network services do (Apache is an obvious example). But after a short look around my system I discovered that rsyncd does run as root, but the default rsyncd.conf has this stuff, maybe yours is the same way:

Code:
use chroot = yes
read only = yes


So the assumption there is that rsync will only provide read access to some limited set of data unless you take steps to open it up further. It strikes me as a sensible safety measure to make that the default, and people who want more liberalized access can always read the docs and make the changes they need.

You don't need an rsync daemon for what you're doing anyway, and I'm not sure from what you've said so far why you'd want one. SSH works just fine as an rsync transport and will always grant the kind of access permissions any given user should expect.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum