Why does the file permissions for all my WordPress files are being changed when I clone?
The directories are 775 when they are supposed to be 755 and files are 664 when
Check your config on the server where you are cloning:
git config core.sharedRepository
group
, it would set the writable bit automatically.umask
, it would depends on your local umask.More generally, check your umask
(as in this question).
The OP Kenny confirms that setting umask to 0022 works.
The articles referenced in this answer detail what it involves in term of security.
The default
umask 002
used for normal user. With this mask default directory permissions are 775 and default file permissions are 664.A
umask
of022
allows only you to write data, but anyone can read data.