-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[BUG] symfony console cache:clear write folder with 775 rights #1968
Comments
P.S. I hacked it temporarily with that: |
Not sure what to say ... I haven't experience this error ever and I don't remember any reported issue about this. But it looks important enough to keep investigating it. |
My configuration:
What are other useful informations I could provide? Some screenshoot: EDIT: |
Having same issue here
|
Having the same issue, php7.1 on mac locally, apache installed. Solve it with a 'sudo chmod -R 777 var/cache/' after each cache:clear, but annoying |
Same problem on archlinux, I have to do sudo chmod -R 777 var/cache/' after each cache:clear ..... |
Any news about this issue? |
I ran composer update but I still have the issue |
Update: sorry, I linked to the wrong pull request. |
Some of you showed that running a |
What informations would be useful? |
Having the issue as well. Thing I notice is that the easy_admin folder is the ONLY folder without a write permission for everyone. See screenshot below. This is the result just after a cache:clear --env=dev command. Specs: If you need more info let me know. |
I also have the same problem, on both Linux and Windows. |
I'm closing this issue because we're starting a new phase in the history of this bundle (see #2059). We've moved it into a new GitHub organization and we need to start from scratch: no past issues, no pending pull requests, etc. I understand if you are angry or disappointed by this, but we really need to "reset" everything in order to reignite the development of this bundle. |
From Symfony 4, all plugins/bundles should rely on cache warmup to write on cache (see https://symfony.com/doc/current/setup/file_permissions.html). |
Hey @javiereguiluz ! I have the same problem and I'm pretty sure it comes from virtualized environments (or similar environments) as the user of the webserver does not have the permissions to write the cache cleared by the console/user manually. However as @ebuildy said, we should rely on Symfony caching features handling this for us. Let's discuss this :) (here or on Slack if you want). |
I don't use virtualized/containarized apps, so I'm afraid I can't fix this myself. If anyone with experience knows how to solve this, please send a pull request and I'll help reviewing it, testing it (in non-virtualized apps), etc. Thanks a lot!! |
I'll have a look :) . |
…vironment (nielsvandermolen) This PR was squashed before being merged into the 1.x branch (closes #2234). Discussion ---------- Fix #1968 [Bug] Add workaround for cache permissions dev environment Applied the workaround in #1968 comment 2. It seems to be important to get this in because the steps are communicated in the [quick demo blog article from Fabian](http://fabien.potencier.org/symfony4-demo.html) Many people can reproduce the issue with the following steps: 1. Install latest stable Symfony 4 version 2. Install this bundle with the admin package (composer req admin) 3. Creating a product and update doctrine 4. Go to the website and you should see the error: 5. The directory "/var/www/project/var/cache/dev/easy_admin" is not writable. 6. Temporary solve it by chmod 777 var/cache/dev/easy_admin 7. Cache clear the error appears again (permission of the folder is set to 775 With the patch the issue does not occur and the permissions of the directory is set to 777. It seems the patch is only needed for the development environment because in the production environment the cache is build before pages are visited (warmup). Commits ------- f73a6e4 Fix #1968 [Bug] Add workaround for cache permissions dev environment
* 1.x: Fixed code syntax Fix #1968 [Bug] Add workaround for cache permissions dev environment save a lot of template exists checks
IMHO this fix will work only if you explicit set APP_ENV variable to 'dev' (so Symfony environment is 'dev'). |
Hi,
When I run the php bin/console cache:clear command, the easyadmin cache folder under var/cache/dev/easyadmin is created with 775 rights instead of 777.
So When I go on the web page I get:
The directory "my_path_to/var/cache/dev/easy_admin" is not writable.
As if the umask(0000); from the console didn't work?
I tracked the issue to the CacheManager class, calling the parent::construct of FilesystemCache with no $umask third parameter. That third parameter is 0002 by default in the FilesystemCache construct.
But I think if it was really an issue with the bundle, someone else would have reported it by now. Maybe I lack some conf?
The text was updated successfully, but these errors were encountered: