1

我对目录的权限有以下问题。
实际上我安装了symphony2.0,我收到以下错误:

RuntimeException: Unable to write in the cache directory   
(/Users/someUser/Sites/someApp/app/cache/dev) 

如果我列出我得到的目录

ll /Users/someUser/Sites/someApp/app/cache
(1)
drwxr-xr-x someUser

我有另一个安装,它的工作和权限是

(2)
drwxr-xr-x+ someUser

所以我的问题是如何获得 (2) ?
我运行以下命令(3)来获得(1),但我不知道如何获得(2)。

(3)
sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs

PS:
关于(1)和(2)的区别只是+最后。

4

2 回答 2

1

查看http://symfony.com/doc/current/book/installation.html

1) 在支持 chmod +a 的系统上使用 ACL

$ rm -rf app/cache/*
$ rm -rf app/logs/*

$ sudo chmod +a "www-data allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
$ sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs

2) 在不支持 chmod +a 的系统上使用 Acl

$ 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
于 2012-09-17T19:36:50.007 回答
0

+权限末尾的符号表示存在 ACL 列表,它是 *nix 正常权限的扩展。您可以使用 打印出来ls -lZ。然后您可以setfacl设置它们。

于 2012-09-17T19:46:12.330 回答