Warning: file_put_contents(/datas/wwwroot/jiajiahui/core/caches/caches_template/2/default/show.php): failed to open stream: Permission denied in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 55

Warning: chmod(): Operation not permitted in /datas/wwwroot/jiajiahui/core/libraries/classes/template_cache.class.php on line 56
编辑器上传图片出现You don't have permission to access /data/resource/kindeditor/php/upload_json.php on this s - 源码之家

编辑器上传图片出现You don't have permission to access /data/resource/kindeditor/php/upload_json.php on this s

上传图片出现You don't have permission to access /data/resource/kindeditor/php/upload_json.php on this server错误。
操作系统是:linux
服务器是:apache

编辑器上传图片出现You don't have permission to access /data/resource/kindeditor/php/upload_json.php on this s

经过排查原理是配置文件的问题

原配置文件是这样的

<DirectoryMatch "/alidata/www/xxx/(attachment|html|data)">
<Files ~ ".php">
Order allow,deny
Deny from all //注意这里,无条件禁止访问
</Files>
</DirectoryMatch>

把这段代码修改如下:

<DirectoryMatch "/alidata/www/116/(attachment|html|data)">
<Files ~ ".php">
Order allow,deny
#Deny from all //代码注销
Allow from all //修改这里
</Files>
</DirectoryMatch>

这样问题就解决了,可以正常上传图片。