當我嘗試更新作曲家或清除我的symfony項目的緩存時,我經常會收到文件權限錯誤。 http://symfony.com/doc/current/setup/file_permissions.htmlSymfony Project,無法修復文件權限
linux下的我',Manjaro鸚鵡版(最新穩定版) 服務器apache的最後一個版本
例如:
composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
> Incenteev\ParameterHandler\ScriptHandler::buildParameters
Updating the "app/config/parameters.yml" file
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
> Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
// Clearing the cache for the dev environment with debug true
[Symfony\Component\Filesystem\Exception\IOException]
Failed to remove file "/srv/http/PetitMur/var/cache/de~/annotations/1a/5b504d5c506c6174666f726d42756e646c655c456e746974795c41727469636c652474616773405b416e6e6f745d5d5b315d.doctrinecache.data": .
然而,我的文件是根據symfony中的文檔設置正確
該文件有這樣的權利:
pierre $ la /srv/http/PetitMur/var/cache/de~/annotations...data
-rw-rw-r--+ 1 http http 234 29.09.2016 18:13 /srv/http/PetitMur/var/cache/de~/annotations...data
我知道,這個問題是經常性的。但是我已經根據symfony的doc設置了權限文件。目前我必須在超級用戶上運行命令才能使其工作,這是不正常的。
你有想法嗎?
編輯:
php bin/symfony_requirements
Symfony Requirements Checker
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> PHP is using the following php.ini file:
/etc/php/php.ini
> Checking Symfony requirements:
.............................WW......
[OK]
Your system is ready to run Symfony projects
Optional recommendations to improve your setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* intl extension should be available
> Install and enable the intl extension (used for validators).
* a PHP accelerator should be installed
> Install and/or enable a PHP accelerator (highly recommended).
Note The command console could use a different php.ini file
~~~~ than the one used with your web server. To be on the
safe side, please check the requirements from your web
server using the web/config.php script.
您是否嘗試使用rm -rf var/cache/*清除? –
是的,但過了一段時間後問題又回來了。 –
哪個網站服務器?它是Apache嗎? –