Why does rsync change directory permissions
Eric Shubert
ejs at shubes.net
Thu May 6 17:22:11 MST 2010
joe at actionline.com wrote:
> When using rsync to upload files to my web host,
> it is changing directory permissions so things don't work
> until I ssh in and change the directory permission back
> to 755.
>
> Why is it doing this and what do I need to do to keep
> the permissions as they are set on my local system at 755.
>
> Here's the syntax that I used first and second. I added the 'p'
> thinking that would preserve permissions, but it did not.
>
> rsync -avH --progress /home/joe/mydata/av7/website/
> vsiqcom at box582.bluehost.com:www/av7/website/
> rsync -avHp --progress /home/joe/mydata/av7/website/
> vsiqcom at box582.bluehost.com:www/av7/website/
>
The -p is included with the -a option, so that won't make a difference.
Is there some reason you need to use the -H option? The rsync man page says:
-a, --archive archive mode; equals -rlptgoD (no -H,-A,-X)
I'm not sure of the ramifications of using -a and -H together.
Do you perhaps mean to use -h instead?
--
-Eric 'shubes'
More information about the PLUG-discuss
mailing list