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

[6.x] Add file permission config option for the File cache store #31579

Merged
merged 3 commits into from
Feb 24, 2020

Conversation

klimov-paul
Copy link
Contributor

Adds 'permission' configuration option for the File cache store.

At the present state file cache writes files with the default umask, which is usually allows writing (deleting) only for the owner.

This creates trouble in some environments, when cache is written by web-server (e.g. nginx) and then accessed from the artisan console.

In particular this make php artisan cache:clear command to silently fail to remove file cache created by web-server.

This PR adds 'permission' config option for the FileStore, in the same manner as for Stream Logger.

@driesvints driesvints changed the title [Enh] Add file permission config option for the File cache store [6.x] Add file permission config option for the File cache store Feb 24, 2020
@taylorotwell taylorotwell merged commit 61b5aa1 into laravel:6.x Feb 24, 2020
taylorotwell pushed a commit that referenced this pull request Feb 26, 2020
…1593)

* Change cache filesystem permission so if the config is not set it does
not issue a chmod call.

This reverts some of the behavior in 61b5aa1
From pull request #31579

* Update FileStore.php

Co-authored-by: Graham Campbell <GrahamCampbell@users.noreply.github.com>
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

3 participants