我最近安装了Codiad IDE,并按照自述文件中的说明操作,我还指定了www-data组来运行安装了codiad的/ var / www / web文件夹,并且已经为所有人提供了正确的文件权限文件夹但我在尝试保存文件时出现此错误
Nov 1 19:27:57 MultiCrew apache2: PHP Warning: fopen(/var/www/test/index.html): failed to open stream: Permission denied in /var/www/web/components/filemanager/class.filemanager.php on line 453
Nov 1 19:27:57 MultiCrew apache2: PHP Stack trace:
Nov 1 19:27:57 MultiCrew apache2: PHP 1. {main}() /var/www/web/components/filemanager/controller.php:0
Nov 1 19:27:57 MultiCrew apache2: PHP 2. Filemanager->modify() /var/www/web/components/filemanager/controller.php:82
Nov 1 19:27:57 MultiCrew apache2: PHP 3. fopen() /var/www/web/components/filemanager/class.filemanager.php:453
我也试过给/ components / filemanager和/class.filemanager.php文件夹/文件777权限,但没有解决它。
以下是ls -alh / var / var / www和/ var / www / web命令的结果
root@MultiCrew:~# ls -alh /var
total 60K
drwxr-xr-x 15 root root 4.0K Aug 14 20:43 .
drwxr-xr-x 22 root root 4.0K Oct 4 18:07 ..
drwxr-xr-x 5 root root 4.0K Nov 1 06:25 backups
drwxr-xr-x 13 root root 4.0K Feb 9 2017 cache
drwxrwxrwt 2 root root 4.0K Oct 13 06:25 crash
drwxr-xr-x 64 root root 4.0K Oct 28 12:31 lib
drwxrwsr-x 2 root staff 4.0K Apr 12 2016 local
lrwxrwxrwx 1 root root 9 Aug 2 2016 lock -> /run/lock
drwxr-xr-x 11 root syslog 4.0K Nov 1 06:25 log
drwxrwsrwt 2 root mail 4.0K Oct 28 12:29 mail
drwxr-xr-x 3 root root 4.0K Dec 18 2016 opt
drwxr-xr-x 3 root root 4.0K Aug 14 20:44 repo
lrwxrwxrwx 1 root root 4 Aug 2 2016 run -> /run
drwxr-xr-x 2 root root 4.0K Jun 29 2016 snap
drwxr-xr-x 4 root root 4.0K Oct 28 12:31 spool
drwxrwxrwt 5 root root 4.0K Nov 1 19:39 tmp
drwxrwxrwx 12 git root 4.0K Oct 27 20:11 www
root@MultiCrew:~# ls -alh /var/www
total 30M
drwxrwxrwx 12 git root 4.0K Oct 27 20:11 .
drwxr-xr-x 15 root root 4.0K Aug 14 20:43 ..
-rw------- 1 sso sso 6.5K Oct 31 18:08 .bash_history
drwxr-xr-x 8 root root 4.0K Sep 16 11:05 book
drwx------ 2 sso sso 4.0K Aug 23 21:13 .cache
drwxrwxrwx 7 sso www-data 4.0K Oct 15 14:36 fly
drwxr-xr-x 16 sso www-data 4.0K Sep 14 19:27 forums
drwxr-xr-x 9 git www-data 4.0K Oct 4 20:20 html
-rw-r--r-- 1 root root 30M Sep 15 09:18 multicrew.zip
-rw------- 1 sso sso 68 Sep 15 08:41 .mysql_history
drwxrwxr-x 2 sso sso 4.0K Aug 29 03:48 .nano
drwxr-xr-x 4 sso root 4.0K Sep 1 04:02 portal
-rw------- 1 root root 1.0K Aug 27 06:52 .rnd
drwxr-xr-x 14 root root 4.0K Oct 29 11:14 status
-rw-r--r-- 1 sso sso 0 Aug 26 19:53 .sudo_as_admin_successful
drwxr-xr-x 6 git root 4.0K Oct 1 12:06 test
drwxrwxrwx 11 www-data www-data 4.0K Oct 27 20:12 web
root@MultiCrew:~# ls -alh /var/www/web
total 152K
drwxrwxrwx 11 www-data www-data 4.0K Oct 27 20:12 .
drwxrwxrwx 12 git root 4.0K Oct 27 20:11 ..
-rwxr-xr-x 1 www-data www-data 413 Oct 27 20:12 AUTHORS.txt
-rw-r--r-- 1 www-data www-data 456 Oct 27 20:12 build.xml
-rw-r--r-- 1 www-data www-data 12K Oct 27 20:12 common.php
drwxrwxrwx 17 www-data www-data 4.0K Oct 27 20:12 components
-rw-r--r-- 1 www-data www-data 1.2K Oct 27 20:12 composer.json
-rw-r--r-- 1 www-data www-data 1.8K Oct 27 20:12 config.example.php
-rw-rw-rw- 1 www-data www-data 1.6K Oct 28 09:15 config.php
-rwxr-xr-x 1 www-data www-data 1.8K Oct 27 20:12 CONTRIBUTING.md
drwxrwxrwx 3 www-data www-data 4.0K Oct 28 09:16 data
-rw-r--r-- 1 www-data www-data 567 Oct 27 20:12 .editorconfig
-rwxr-xr-x 1 www-data www-data 1.2K Oct 27 20:12 favicon.ico
drwxr-xr-x 8 www-data www-data 4.0K Oct 27 20:12 .git
-rwxr-xr-x 1 www-data www-data 173 Oct 27 20:12 .gitignore
-rwxr-xr-x 1 www-data www-data 19K Oct 27 20:12 index.php
-rwxr-xr-x 1 www-data www-data 634 Oct 27 20:12 INSTALL.txt
drwxr-xr-x 2 www-data www-data 4.0K Oct 27 20:12 js
drwxr-xr-x 2 www-data www-data 4.0K Oct 27 20:12 languages
drwxr-xr-x 2 www-data www-data 4.0K Oct 27 20:12 lib
-rwxr-xr-x 1 www-data www-data 1.2K Oct 27 20:12 LICENSE.txt
drwxrwxrwx 2 www-data www-data 4.0K Oct 27 20:12 plugins
-rwxr-xr-x 1 www-data www-data 907 Oct 27 20:12 README.md
-rwxr-xr-x 1 www-data www-data 24K Oct 27 20:12 style_guide.php
drwxr-xr-x 3 www-data www-data 4.0K Oct 27 20:12 themes
-rw-r--r-- 1 www-data www-data 1.4K Oct 27 20:12 .travis.yml
drwxrwxrwx 3 www-data www-data 4.0K Oct 28 09:20 workspace
由于