Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Upgrading SilverStripe /

Ask questions about upgrading SilverStripe to the latest version.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Composer, Git and permissions


Go to End


2 Posts   2172 Views

Avatar
EdP

Community Member, 14 Posts

3 March 2015 at 10:47pm

Whenever I run a composer update any updated folders (e.g. framework, cms) are given 775 permissions, and their files 664, which I have read is a Git default (although I'm no linux expert). Our cPanel server runs suphp, which requires 755 and 644 respectively, so we get a 500 server error until manually changing all the permissions.

Is there any way that composer can preserve existing permissions, or be told which default permissions to use?

Avatar
wmk

Community Member, 87 Posts

15 March 2015 at 4:06am

Hi EdP,

maybe a composer post-install or post-update script may help? See https://getcomposer.org/doc/articles/scripts.md for more info. You can define a script that is executed when a package is installed or updated.

Seems like git uses the user's umask command to get the default permissions, see git config man page

Cheers, wmk