0

我的朋友在linux server使用plesk.

404 error几乎在每一页上,他得到的错误代码粘贴在下面:(我不能发布两个以上的链接,所以yaoihavenreborn.com你会看到***

[Sun Mar 31 19:17:52 2013] [error] [client 69.158.139.233] PHP Warning: is_readable():
 open_basedir restriction in effect. File(/var/www/vhosts/***/httpdocs/wp-
content/plugins/content-progress/content-progress.php/content-progress-en_US.mo) is not 
within the allowed path(s): (/var/www/vhosts/***/httpdocs:.:/php:/tmp) in 
/var/www/vhosts/***/httpdocs/wp-includes/l10n.php on line 339, referer: http://***/whats-
new/

我们查看了提到纠正open_basedir错误的类似帖子,但创建一个vhost并没有解决问题,我们根本不知道该怎么办。

error log这是使用以下说明添加后的副本vhosthttp://www.bigsoft.co.uk/blog/index.php/2007/12/30/fixing-php-s-require-open_basedir-restri

[Mon Apr 01 00:53:47 2013] [error] [client 99.112.124.229] PHP Warning:  fopen(/var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/css/mce_modify.css): failed to open stream: Permission denied in /var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/options_functions.php on line 1209, referer: http://***/forums/forum/yaoi-haven-reborn/
[Mon Apr 01 00:53:47 2013] [error] [client 99.112.124.229] PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/options_functions.php on line 1210, referer: http://***/forums/forum/yaoi-haven-reborn/
[Mon Apr 01 00:53:47 2013] [error] [client 99.112.124.229] PHP Warning:  fclose() expects parameter 1 to be resource, boolean given in /var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/options_functions.php on line 1211, referer: http://***/forums/forum/yaoi-haven-reborn/
[Mon Apr 01 00:53:47 2013] [error] [client 99.112.124.229] PHP Warning:  chmod(): Operation not permitted in /var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/options_functions.php on line 1212, referer: http://***/forums/forum/yaoi-haven-reborn/
[Mon Apr 01 00:53:49 2013] [error] [client 67.1.158.170] PHP Warning:  fopen(/var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/css/mce_modify.css): failed to open stream: Permission denied in /var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/options_functions.php on line 1209, referer: http://***/forums/topic/blah-blah-favorite-gamesmusic-and-making-friends3/
[Mon Apr 01 00:53:50 2013] [error] [client 108.29.88.87] PHP Warning:  chmod(): Operation not permitted in /var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/options_functions.php on line 1212, referer: http://***/forums/topic/blah-blah-favorite-gamesmusic-and-making-friends3/

感谢您的任何帮助:)

4

1 回答 1

0

您的文件夹中的文件权限设置不正确www:您应该为您的www-data用户(组)设置项目中的文件和文件夹可读。

sudo chgrp -R www-data /var/www/ #set the usergroup for all files, directories in www folder
sudo chmod -R g+r /var/www # make all file/dir readeable by group
find /var/www/ -type d | xargs sudo chmod g+xs //make all dir executeable (and set the group rights inherited by newly created files, dirs in the future, so you dont need to repeat the permission settings when you will create new files.

在下面的命令中,将 /var/www 更改为您的项目根目录,如果服务器中有多个项目,并且您只有当前项目有问题。

并且你应该设置可写,哪些文件需要被php写入:

sudo chmod g+w /var/www/vhosts/***/httpdocs/wp-content/plugins/ultimate-tinymce/css/mce_modify.css
//repeat this on all file need to be written by your webapp
于 2013-04-01T06:42:05.880 回答