问题描述
我曾使用Subversion还原我的PHP Opencart项目,但遇到了权限问题(示例如下所示:
I had used subversion to revert my PHP Opencart project, but I got a permission issue (sample shown below:
警告:imagejpeg():无法打开"/var/www/html/opencart/image/cache/data/pavblog/img-blog-250x250w.jpg"以进行写入:/var/www/html中的权限被拒绝/opencart/system/library/image.php,第45行
Warning: imagejpeg(): Unable to open '/var/www/html/opencart/image/cache/data/pavblog/img-blog-250x250w.jpg' for writing: Permission denied in /var/www/html/opencart/system/library/image.php on line 45
警告:imagejpeg():无法打开...
Warning: imagejpeg(): Unable to open...
我执行了以下命令来向这些文件夹添加权限,但是我仍然在我的网站上收到警告消息.
I executed the below commands to add permissions to these folders, but I'm still getting the warning messages on my site.
sudo chmod 777 /var/www/html/opencart
cd /var/www/html/opencart
sudo chmod 777 image/
sudo chmod 777 image/cache/
sudo chmod 777 image/data/
sudo chmod 777 system/cache/
sudo chmod 777 system/logs/
sudo chmod 777 download/
sudo chmod 777 config.php
sudo chmod 777 admin/config.php
我该如何解决?
推荐答案
您需要递归应用权限.试试
You need to apply permissions recursively. Try
sudo chmod -R 777 image/cache/
这篇关于如何解决Opencart的Linux许可问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!