-
Notifications
You must be signed in to change notification settings - Fork 53
Override default umask in PHP
#555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
umask in PHP more permissiveumask in PHP
|
Heads up that this solution won't fix 8818-gh-Automattic/dotcom-forge. More info in https://github.com/Automattic/dotcom-forge/issues/8818#issuecomment-2368833340. |
|
Following this comment, I'm going to implement a different approach to override the |
This approach replaces the one using a plugin.
wojtekn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It fixes the issue for me. I was able to fix the broken Sage site:
rm -rf wp-content/cache
cd wp-content/themes/sage-vite
yarn install && composer install && yarn build
|
Hey there guys! I was just wondering (because I'm seen this is already merged) when is this going to be available in production studio? Because I opened this ticket #269 (comment) and it said it was going to be taken care over here. Nevertheless even having the latest Studio version, with PHP 8.3 Best regards. |
|
@lajennylove thanks for retesting it. We fixed the permissions issue, so the directory should have the correct ones when it's created, but if your directory was created before, it will likely still have incorrect permissions. Please try removing that cache directory and trying again. |
|
Hey @wojtekn! I just tested it as you mentioned and it completely worked. I will try with a real project that I'm working with it to check its relability, and if it works I will implemented it in my company as part of our local development stack. Just a quick question (I know this is not the channel maybe and I have to raise other ticket but) I was just wondering if is there a way to control the .htaccess/nginx rules to try something like this? Best regards. |
|
@lajennylove thanks for confirming that.
No, Studio currently doesn't support Apache-like rewrite rules. |



Related to 8816-gh-Automattic/dotcom-forge.
Proposed Changes
In the meantime, we'll create an internal plugin that will override the defaultumaskvalue. Note that this plugin is located in a special folder managed by Playground for platform-level-specific plugins.umaskvalue by pretending a PHP file using theauto_prepend_filePHP directive.Testing Instructions
Create files with test file
npm start.test.php, at the root level on the site, with the following content:http://localhost:<PORT>/test.php.umaskvalue shown on the page is0022.rwxr-xr-x(Full access to owner, and only READ and EXECUTE permissions to group and others).Addresses #269
npm start.cd wp-content/themes.git clone https://github.com/DevArge/sage-vite.git.cd sage-vite.yarn install && composer install && yarn build.Pre-merge Checklist