Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rsync deploy and file/directories permissions

Tags:

I'm trying to use rsync to deploy my website that resides on a shared web host.

Phpsuexec is running on it and that caused me problems with permissions on files and directories I've transfered via rsync. Actually files should be set to 644 and directories to 755, otherwise I get a 500 error.

After several attempts, I came with this rsync command:

rsync -avz -e ssh --chmod=Du=rwx,go=rx,Fu=rw,og=r -p --exclude-from=/var/www/mylocalfolder/.rsyncignore /var/www/mylocalfolder/ [email protected]:~/

Unfortunately this command doesn't works as expected because all the sent directories have been set to 744. On the other hand, files permission have been correctly set on 644.

I can't understand what is wrong.

P.S. I use Linux on my local machine.

like image 306
Granze Avatar asked Feb 07 '12 13:02

Granze


1 Answers

Try it like this :

--chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r

It worked for me.

like image 153
Shadow aok Avatar answered Sep 17 '22 12:09

Shadow aok