0

linux server私の友人は、を使用して Web サイトをホストしていますplesk

彼は404 errorほぼすべてのページにアクセスしており、彼が受け取ったエラー コードを以下に貼り付けます: (2 つ以上のリンクを投稿できませんでした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 に答える