duanhe1965 2015-09-22 05:14
浏览 36

作曲家更新的文件权限

The app/cache and app/logs folder mode has been set to 0777. And apache run user and group same with cli user. Running

php app/console cache-clear

works fine as well. But the problem is when composer update, I always get:

[InvalidArgumentException]
The directory "/home/userx/symfony/app/cache/dev/annotations" is not writable. Both, the webserver and the console user need access. You can manage access rights for multiple users with "chmod +a". If your system does not support this, check out the acl package.

cache:clear [--no-warmup] [--no-optional-warmers]

Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the post-update-cmd event terminated with an exception

[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command.

What could be the issue ? Thanks.

  • 写回答

1条回答 默认 最新

  • dslk6326846 2015-09-23 12:21
    关注

    It looks like the cache warmup is responsible here. It creates file in app/cache/dev and app/cache/prod after you update composer.

    You should make sure that all the folders inside app/cache and app/logs are writable, that is :

    chmod -R 0777 app/cache app/logs
    

    777 is maybe a bit too permissive but that will do if you work locally. If you're in a production environnement, you should chgrp instead and give rw permissions to the group only, not everybody.

    评论

报告相同问题?

悬赏问题

  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作