JMSDiExtraBundle
JMSDiExtraBundle copied to clipboard
permission error with capifony
the metadata permission is different rather than other cache dirs. it is drwxr-xr-x where it should be drwxrwxr-x
drwxrwxr-x 2 deployer deployer 4096 2012-12-18 14:32 controller_injectors/ drwxrwxr-x 2 deployer deployer 4096 2012-12-18 14:32 doctrine/ drwxr-xr-x 2 deployer deployer 4096 2012-12-18 14:32 metadata/ drwxrwxr-x 2 deployer deployer 4096 2012-12-18 14:32 proxies/
I have the same problem after deploying with Capifony too. I get a blank page and the prod.log
says:
The directory ".../app/cache/prod/jms_serializer" is not writable. at .../shared/vendor/jms/metadata/src/Metadata/Cache/FileCache.php:17
The cache/prod
folder gets created with the current SSH User - no sudo - everything looks correct.
Capifony does the following tasks:
php app/console cache:warmup --env=prod --no-debug
chmod -R g+w /...releases/.../app/cache
echo stat /...releases/.../app/cache -c %U
As soon as I remove the cache folder -
as suggested by @schmittjoh in https://github.com/schmittjoh/JMSDiExtraBundle/issues/23#issuecomment-6198328 -
and reload the page the cache folder is rewritten - this time the apache
user owns it. The page is loaded correctely.
I am using Symfony 2.6 on CentOS (running Plesk) and php 5.3.3 (unfortunately).
Possibly related issues:
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/128
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/23
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/135
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/45
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/55
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/188
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/134
Related Capifony issues:
- https://github.com/everzet/capifony/issues/443
This is still a problem when deploying the app with Capistrano v3, v3 or Capifony and Symfony 2.7.
Any fixes @schmittjoh?
Unfortunately I can not use acl
that's why this workaround by @loostro won't work: https://github.com/schmittjoh/JMSDiExtraBundle/issues/128
In the end - since I cannot use acl
on @freeBSD and chmod
did not solve this issue - I had to do worst practice:
http://symfony.com/doc/current/book/installation.html#checking-symfony-application-configuration-and-setup
#!/usr/bin/env php
<?php
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
umask(0000);