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

File permissions and Symfony 4 #149

Open
nicwortel opened this issue Mar 1, 2019 · 0 comments
Open

File permissions and Symfony 4 #149

nicwortel opened this issue Mar 1, 2019 · 0 comments

Comments

@nicwortel
Copy link

In Symfony 4, umask() is used in bin/console and public/index.php so that (cache) files created by Symfony are writable for both the console user as well as the www-data user. See https://symfony.com/doc/current/setup/file_permissions.html for more information.

However, when using the Symfony2Extension, the Symfony kernel is booted directly, so the umask isn't set and also Debug::enable() isn't called. In our case we're also using Behat to test against a version of our application that is running in Docker (using Mink over HTTP), but that fails because the web server in Docker isn't allowed to write cache files to the cache directory that was created just a moment before.

We can work around that by creating a custom bootstrap file containing umask(0000); and then requiring the Symfony bootstrap file, but perhaps this is something that can be fixed in this extension?

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

No branches or pull requests

1 participant