[lug] rsync permissions problem

Dan Ferris dan at usrsbin.com
Thu Dec 14 20:19:58 MST 2006


Be warned that it slows rsync down *a lot* if you turn on verbose or 
progress.

I have learned the hard way.

Dan

Hugh Brown wrote:
> Paul Nowosielski wrote:
>> Dear All,
>>
>> I have a rsync permissions problem that I can't figure out. I have a 
>> dev server and a WWW server. I use a simple rsync script to push the 
>> files from dev to www.
>>
>> On the WWW server /var/www is permissioned 775 wwwrun.www .
>> The user who pushes the files is named "back". "back" is in the www  
>> group.
>>
>> When I call the script from dev I get all these permission denied 
>> errors and Im not sure why because its group WWW writable. The only 
>> way I can get this to work is by chmod 777 /var/www then reverting.
>>
>> Any idea??
>>
>>
>
>
> You can add --progress --verbose to your rsync to get more feedback.
>
> There are two sets of permissions here, the permissions on the source 
> and on the destination.  I'm assuming:
>
> user at dev $  cd /web/devel/tree
> user at dev $  rsync -e ssh -a . back at webhost:/var/www/
>
> If that's the case, then I'd suspect that the ownership in 
> /web/devel/tree/ doesn't match for a file in webhost:/var/www
>
> e.g.
>
>  dev:/web/devel/tree/index.html is owned by "user" but on 
> webhost:/var/www/index.html it is owned by wwwrun.  If you are using 
> --archive (-a) on rsync, then it will try and change the owner from 
> wwwrun to "user" and fail.
>
> If that's the problem, then look at turning off user/group preservation.
>
> The other problem would be that "user" on dev is trying to read files 
> locally to push up to the www server and it fails there.
>
> You can use -vv options to rsync to get even more verbosity.
>
> A third possibility is that there are subdirectories of 
> webhost:/var/www that don't have group write and therefore can't 
> create new files.
>
> HTH,
> Hugh
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
>
>

-- 
#Consensual Unix
# unzip ; strip ; touch ; finger ; mount ; fsck ; more ; yes ; umount ; sleep


There is a time and a place for use of weapons. Miyamoto Musashi, 1645




More information about the LUG mailing list