welaika / wordmove

Multi-stage command line deploy/mirroring and task runner for Wordpress
https://wptools.it/wordmove
MIT License
1.87k stars 167 forks source link

Folders and file permissions after pushing wordpress #354

Closed brunoDegaspare closed 7 years ago

brunoDegaspare commented 7 years ago

Hi, Firstly I apologise if this question has been already asked here.

My issue is that when I move Wordpress from local to server using wordmove all foders permissions are set to 777. Is there a way to keep the permissions on the server set to 755 ?

Thank you.

alessandro-fazzi commented 7 years ago

Hi there,

you should make direct use of rsync's option --chmod; refer to rsync manual for an insight of the matter. Wordmove gives you a proxy-option to pass options to the underneath rsync:

rsync_options: "--chmod=755"

Anyway keep in mind: permissions does not depends on Wordmove self, but on your user - and its permission mask - on the remote server. So it's not always possible to modify permissions based on your privilege. In a sane environment you can anyway.

--chmod takes a lot of dialects; I can't help you too deep, but I hope you have a bright clue to follow. :)

Cheers

alessandro-fazzi commented 7 years ago

Oh! rsync-options option is documented here: https://github.com/welaika/wordmove/wiki/Movefile-configurations-explained :)

phidodido commented 7 years ago

This one worked for me with Siteground to set folders to 755 and files to 644 rsync_options: "--chmod=Du=rwx,Dgo=rx,Fu=rw,Fgo=r"