简体   繁体   English

在PrestaShop中拒绝了PHP权限,甚至chmod 777都不起作用

[英]PHP Permission denied in PrestaShop, not even chmod 777 working

i have problem with permissions. 我有权限问题。

I getting error 我收到错误消息

PHP message: PHP Warning:  require(./public_html/shop/modules/dhlexpress/vendor/alfallouji/dhl_api/DHL/Entity/AM/GetQuote.php): failed to open stream: Permission denied in ./public_html/shop/modules/dhlexpress/vendor/alfallouji/dhl_api/vendor/autoloadManager/autoloadManager.php

I tried to set 777 recursive for whole dhlexpress folder. 我试图为整个dhlexpress文件夹设置777递归。 Also i tried to set 755 for folders and 644 for php files. 我也试图为文件夹设置755,为php文件设置644。 Same error. 同样的错误。

Owner of all files is ok. 所有文件的所有者都可以。

Dump from ls -al for ./public_html/shop/modules/dhlexpress/vendor/alfallouji/dhl_api/vendor/autoloadManager/: 从ls -al转储./public_html/shop/modules/dhlexpress/vendor/alfallouji/dhl_api/vendor/autoloadManager/:

drwxrwxr-x 2 master_qfremheqwx www-data  4096 Aug 23 07:29 .
drwxrwxr-x 3 master_qfremheqwx www-data  4096 Aug 23 07:29 ..
-rwxrwxrwx 1 master_qfremheqwx www-data 13945 Jan  6  2017 autoloadManager.php
-rw-rw-r-- 1 master_qfremheqwx www-data  3755 Jan  6  2017 README.md

Dump from ls -al for ./public_html/shop/modules/dhlexpress/vendor/alfallouji/dhl_api/DHL/Entity/AM/ : 从ls -al转储./public_html/shop/modules/dhlexpress/vendor/alfallouji/dhl_api/DHL/Entity/AM/:

drwxrwxr-x 2 master_qfremheqwx www-data  4096 Aug 23 07:30 .
drwxrwxr-x 6 master_qfremheqwx www-data  4096 Aug 23 07:30 ..
-rw-rw-r-- 1 master_qfremheqwx www-data  2137 Jan  6  2017 GetQuote.php

I am hopeless. 我没有希望。 That permissions is killing me. 这种权限杀死了我。

EDIT: 编辑:

I also tried to set 777 for whole dhlexpress folder and sub-folders and files. 我还尝试为整个dhlexpress文件夹以及子文件夹和文件设置777。

dhlexpress folder: dhlexpress文件夹:

777 -rwxrwxrwx 1 master_qfremheqwx www-data 30134 Aug 23 21:51 dhlexpress.php
777 drwxrwxrwx 4 master_qfremheqwx www-data  4096 Aug 24 08:44 vendor

dhlexpress/vendor/alfallouji/dhl_api/DHL/Entity/AM/ folder: dhlexpress / vendor / alfallouji / dhl_api / DHL / Entity / AM /文件夹:

777 -rwxrwxrwx 1 master_qfremheqwx www-data  2137 Jan  6  2017 GetQuote.php

dhlexpress/vendor/alfallouji/dhl_api/vendor/autoloadManager/ folder: dhlexpress / vendor / alfallouji / dhl_api / vendor / autoloadManager /文件夹:

777 -rwxrwxrwx 1 master_qfremheqwx www-data 13945 Jan  6  2017 autoloadManager.php
777 -rwxrwxrwx 1 master_qfremheqwx www-data  3755 Jan  6  2017 README.md

can you require file in 'modules' folder? 您可以在“模块”文件夹中要求文件吗? may be php don't have permission for 'modules' folder 可能是php没有“模块”文件夹的权限

Try changing the permissions from the modules folder or even better from the public_html, most servers works perfect with permissions as: 尝试从modules文件夹更改权限,或者甚至从public_html更改权限,大多数服务器可以完美地与以下权限一起使用:

  • Folders: 0755 文件夹:0755
  • Files: 0644 文件:0644

Okay, done. 好的,完成了。 Problem was in my autoloader from developer. 问题出在我来自开发人员的自动装带器中。 I manualy make bunch of require_once and now its working 我手动制作一堆require_once,现在它可以工作了

For modules and files you need to put the rights in this form: 对于模块和文件,您需要以以下形式放置权限:

755 for directories/folders 644 for files 755用于目录/文件夹644用于文件

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

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