Skip to content
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

[8.x] Ensure cache directory permissions #39591

Merged
merged 4 commits into from
Nov 15, 2021
Merged

Conversation

tontonsb
Copy link
Contributor

@tontonsb tontonsb commented Nov 12, 2021

There's an option to specify file permissions for the cache file store. But currently it only affects the files. All the prefix directories (e.g. cache/data/0b/ee) are created via Filesystem's makeDirectory($path, 0777) which ends up getting whatever umask implies, not what was specified in the config.

The function to ensure the correct permissions was already there. I use it to check the permissions of parent dirs (e.g. cache/data/0b and cache/data/0b/ee) as well. Ideally there would be a separate option for directory permissions and/or just use the Flysystem instead of Filesystem, but I wanted to keep the scope of this PR limited to the actual issue for now.

This should resolve issues like #33770.

@tontonsb tontonsb marked this pull request as draft November 12, 2021 21:40
@GrahamCampbell GrahamCampbell changed the title Ensure cache directory permissions [8.x] Ensure cache directory permissions Nov 12, 2021
@tontonsb tontonsb marked this pull request as ready for review November 12, 2021 23:14
@taylorotwell taylorotwell merged commit 0e9ff79 into laravel:8.x Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants