ユーザ用ツール

サイト用ツール


サイドバー


メニュー




スポンサーリンク





howto:linux:ユーザーディレクトリのホームページが表示できない

howto:Linux:ユーザーディレクトリのホームページが表示できない

症状

  • /home/tuser/public_html/test.html をブラウザで開こうとすると Forbidden You don't have permission to access /~tuser/test.html on this server. と表示される。

対策1

パーミッションの変更

/home/tuser のパーミッションを確認
>ls -l
drwx------ 2 root      root      16384  510 22:18 lost+found
drwx------ 5 tuser     tuser      4096  618 09:18 tuser
/home/tuser のパーミッションを701に変更
>chmod 701 tuser
drwx------ 2 root      root      16384  510 22:18 lost+found
drwx-----x 5 tuser     tuser      4096  618 09:18 tuser

対策2

SELinuxラベルを追加

/home/tuser/public_html にラベルを追加
>restorecon /home/tuser/public_html
>restorecon -R /home/tuser/public_html
howto/linux/ユーザーディレクトリのホームページが表示できない.txt · 最終更新: 2015/12/17 20:33 by dokuroot