php - CakePHP chmod 问题

标签 php cakephp chmod

我下载了 CakePHP 并将其放在我的 www 目录中。我启用了 mod-rewrite 以及所有这些,并更改了我的文档根目录。但我的 apache 错误日志中仍然出现权限被拒绝的错误,因为 Cake 无法需要来自其他目录的文件。几乎就像我需要将每个目录 chmod 为 777 才能完成这项工作。我知道这是不对的,但是有人可以告诉我我是否没有正确安装它或者 CHMOD 是什么。因为到目前为止,它实际上是我正在执行 CHMOD 的每个文件夹。

最佳答案

尝试

chown -R <webserver_user> <cake_dir> #set the owner of your cake dir recursively to your webserver
chmod -R 755 <cake_dir> #set the permissions recursively

您可以通过以下方式获取网络服务器用户

ps -aux | grep apache #or whatever your web server is

关于php - CakePHP chmod 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7179537/

相关文章:

php 分页与中断或继续

php - 亚马逊 s3 存储桶上传图像 curl 异常 'data rewind wasn' t 可能 '

mysql - 使用 mysql 或 cakephp 以月为单位搜索结果

PhpStorm 无法解锁文件 (Ionic)

php 获取数组的逆序

php - 从其他 (xml) 内容自动创建 drupal 页面(节点)

php - CakePHP的 "saveAll"需要3分钟以上才能保存?

php - 连接中断的可能原因,LAMP堆栈

php - 使所有 PHP 文件可执行(递归)

html - Chmod 权限被拒绝 - 文件权限 600