LoginSignup
0
3

More than 5 years have passed since last update.

CentOS > Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/home/user/public_html/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0 > SELinux

Last updated at Posted at 2016-07-24
動作確認
CentOS 6.5 (64bit)

httpdをインストールして、php環境をセットアップ、ブラウザからlocalhost/index.phpを表示しようとしたら以下のエラーがブラウザに表示された。

Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0 Fatal error: Unknown: Failed opening required '/home/user/public_html/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0

ファイルのパーミッション関連をいじったが変化なかった。

SELinux関連のようだ。

http://park1.wakwak.com/~ima/centos4_selinux0001.html
を参考に試しに以下を実行したらindex.phpが見えるようになった。

setenforce 0
0
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
3