简体   繁体   English

Symfony2缓存目录权限

[英]Symfony2 cache directory permissions

Sorry, I'm new to Symfony. 抱歉,我是Symfony的新手。

I think I've tried everything here. 我想我已经在这里尝试了一切。 I'm trying to install a Symfony v2.8 application on a new machine. 我正在尝试在新计算机上安装Symfony v2.8应用程序。 When I'm trying to access the application I'm getting exceptions stating lack of permissions to access either cache or logs directory. 当我尝试访问应用程序时,出现异常,说明缺少访问缓存或日志目录的权限。 Cache and logs directories are writeable though - mask 777 set for both. 缓存和日志目录是可写的-为两者都设置了掩码777。 Also there seems to be a process that creates entries in the cache directory as it fills in with files. 似乎还有一个在缓存目录中填充文件时创建条目的过程。 The problem seems to be that the web server can't access them - but why? 问题似乎是Web服务器无法访问它们-但是为什么呢?

getfacl for both cache and logs directories returns this: 缓存和日志目录的getfacl返回以下内容:

# owner: apache
# group: apache
user::rwx
user:apache:rwx
group::rwx
mask::rwx
other::rwx
default:user::rwx
default:user:apache:rwx
default:group::rwx
default:mask::rwx
default:other::rwx

Any suggestions would be greatly appreciated. 任何建议将不胜感激。 Thanks! 谢谢!

Check that you logs and cache are being put in the correct location. 检查您的日志和缓存是否放置在正确的位置。 Symfony has " two " major development environments ( dev and prod ). Symfony具有“ 两个主要开发环境( devprod )。 They (env) write logs and caches in two separate folders . 他们(env)在两个单独的文件夹中写入日志缓存 Check the getCacheDir() and getLogDir() methods in the app/AppKernel.php . 检查app / AppKernel.php中getCacheDir()getLogDir()方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM