简体   繁体   English

CakePHP权限问题

[英]CakePHP permission problems

Hello anybody can help with that problem on old cake app: 您好,任何人都可以在旧蛋糕应用程序上解决该问题:

[Wed Sep 26 18:58:29.454771 2018] [core:crit] [pid 28046:tid 140483665811200] (13)Permission denied: [client 170.231.113.140:34906] AH00529: /home/vtecnet/public_html/admin/app/webroot/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/vtecnet/public_html/admin/app/webroot/' is executable [2018年9月26日星期三18:58:29.454771] [core:crit] [pid 28046:tid 140483665811200](13)权限被拒绝:[client 170.231.113.140:34906] AH00529:/ home / vtecnet / public_html / admin / app / webroot / .htaccess pcfg_openfile:无法检查htaccess文件,确保它是可读的并且'/ home / vtecnet / public_html / admin / app / webroot /'是可执行的

In fact the error message is giving you all the information: 实际上,错误消息为您提供了所有信息:

[…] ensure [.htaccess] is readable and that '/home/vtecnet/public_html/admin/app/webroot/' is executable […]确保[.htaccess]可读且'/ home / vtecnet / public_html / admin / app / webroot /'是可执行的

I don't know which version of CakePHP an old cake app is, since you're not telling us, but looking at file permissions and chmod should point you in the right direction. 我不知道旧的蛋糕应用程序是哪个版本的CakePHP,因为您没有告诉我们,但是查看文件权限和chmod应该会为您指明正确的方向。

WordPress has a nice article on permissions: https://book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Installation-Preparation.html#permissions WordPress上有一篇不错的关于权限的文章: https : //book.cakephp.org/1.3/en/The-Manual/Developing-with-CakePHP/Installation-Preparation.html#permissions

Something like this could help you out, if you have shell access to the server: 如果您可以通过外壳访问服务器,则类似的事情可能会对您有所帮助:

# set the ownership to the webserver user (i. e. www-data)
chown -R <insert_webserver_user_here> /home/vtecnet/public_html/admin/
# set permissions recursively
chmod -R 755 /home/vtecnet/public_html/admin/

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

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