请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

thinkphp权限问题

老师,我在centos中搭好了tp5的环境把我自己的网站了上去但是没有效果

这是www-error的错误代码

[07-Mar-2018 17:09:15 PRC] PHP Fatal error:  Uncaught exception 'think\exception\ErrorException' with message 'error_log(/data/www/mytpmall/runtime/log/201803/07.log): failed to open stream: Permission denied' in /data/www/mytpmall/thinkphp/library/think/log/driver/File.php:125
Stack trace:
#0 [internal function]: think\Error::appError(2, 'error_log(/data...', '/data/www/mytpm...', 125, Array)
#1 /data/www/mytpmall/thinkphp/library/think/log/driver/File.php(125): error_log('---------------...', 3, '/data/www/mytpm...')
#2 /data/www/mytpmall/thinkphp/library/think/log/driver/File.php(80): think\log\driver\File->write('[ info ] [ LANG...', '/data/www/mytpm...')
#3 /data/www/mytpmall/thinkphp/library/think/Log.php(179): think\log\driver\File->save(Array)
#4 /data/www/mytpmall/thinkphp/library/think/Error.php(93): think\Log::save()
#5 [internal function]: think\Error::appShutdown()
#6 {main}
  thrown in /data/www/mytpmall/thinkphp/library/think/log/driver/File.php on line 125

然后我在/data/www/mytpmall/runtime里执行chmod -R 777 log也没有解决,麻烦老师帮我看一下,谢谢

正在回答 回答被采纳积分+3

2回答

编程浪子 2018-03-18 10:42:36

可以把www目录所属人和组改成等了人,搜索chmod

0 回复 有任何疑惑可以回复我~
  • 提问者 慕瓜9466948 #1
    老师等了人是什么?
    回复 有任何疑惑可以回复我~ 2018-03-21 14:27:30
  • 编程浪子 回复 提问者 慕瓜9466948 #2
    可以把www目录所属人和组改成登录人,搜索chmod
    回复 有任何疑惑可以回复我~ 2018-03-26 09:54:51
编程浪子 2018-03-18 10:41:52

g(/data/www/mytpmall/runtime/log/201803/07.log): failed to open stream: Permission denied

这句话表示没有权限

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
快速上手Linux 玩转典型应用
  • 参与学习       1663    人
  • 解答问题       572    个

以主流CentOS 7 操作系统为例,系统讲解Linux,真实线上环境助你快速上手,独立配置运维服务器

了解课程
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号