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

[FR] dirMode and fileMode options for FilesystemCache #3827

Open
brandonkelly opened this issue Apr 5, 2023 · 3 comments
Open

[FR] dirMode and fileMode options for FilesystemCache #3827

brandonkelly opened this issue Apr 5, 2023 · 3 comments

Comments

@brandonkelly
Copy link
Contributor

Currently FilesystemCache creates directories with 777 permissions, and PHP files with 666 permissions. It would be nice if new dirMode and fileMode options were supported, which could be used to override those default permissions.

@fabpot
Copy link
Contributor

fabpot commented Sep 12, 2024

I think the current code is reasonable. We're doing the same in Symfony as well. Note that the mode is affected by the umask. So, it's not necessarily 0777. You can call umask() to change the permissions.

if new dirMode and fileMode options were supported -> I'm not sure what you're referring to here?

@brandonkelly
Copy link
Contributor Author

if new dirMode and fileMode options were supported -> I'm not sure what you're referring to here?

I was suggesting that Twig could add new dirMode and fileMode options, giving us a way to set the permissions programmatically when initializing the Twig environment.

@fabpot
Copy link
Contributor

fabpot commented Sep 15, 2024

Would you agree that using umask() is enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants