php删除文件指令,php – Symfony cache:清除命令更改文件夹所有者
請參閱
http://symfony.com/doc/current/book/installation.html#configuration-and-setup中的“設置權限”.
如果您使用Ubuntu,您可以使用setfacl
sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
編輯:
$rm -rf var/cache/* var/logs/* var/sessions/*
$HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
$sudo chmod -R +a "$HTTPDUSER allow delete,write,append,file_inherit,directory_inherit" var
$sudo chmod -R +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" var
如果您的電腦上沒有命令setfacl,則需要安裝它;
sudo apt-get install acl
總結
以上是生活随笔為你收集整理的php删除文件指令,php – Symfony cache:清除命令更改文件夹所有者的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: php账号密码备忘,WordPress使
- 下一篇: php select 多级联动,sele