我正在尝试部署我的第一个Symfony2应用程序。
当试图访问它时,屏幕为空白。
检查日志:
$ sudo tail -f /var/log/apache2/error.log
..。异常'RuntimeException‘与消息’未能写入缓存文件.
试图将好的权限放在缓存和日志上
$ sudo chmod +a "www-data allow delete,write,[...]" app/cache app/logs
chmod:无效模式:`+a‘
尝试用setfacl
$ sudo setfacl -R -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs
setfacl: app/cache:不支持操作 setfacl: app/log:不支持操作
我想我的分区不是用acl或类似的东西挂载的。
我就不能简单地记录一下www数据缓存和日志吗?
发布于 2013-03-20 10:16:07
要使用setfacl,首先需要安装acl实用程序:
# Provided Apt can be used for package management
$ sudo apt-get install acl
然后重新装入包含symfony2项目的磁盘分区:
# Remount the partition containing your Symfony2 application
# e.g. we could remount the root (/) partition
$ sudo mount -o remount,acl / #
# we could also remount the /var partition in our app lives in /var/www
$ sudo mount -o remount,acl /var #
http://symfony.com/doc/2.0/book/installation.html#configuration-and-setup https://help.ubuntu.com/community/FilePermissionsACLs
发布于 2012-07-23 02:16:38
由于您不应该在部署服务器上进行开发,所以只需将整个应用程序交给www-data
用户:
sudo chown -R www-data:www-data /path/to/the/root/of/your/app
https://stackoverflow.com/questions/11610469
复制