LoginSignup
3
8

More than 5 years have passed since last update.

webコンテンツ編集ユーザーとディレクトリのパーミッション

Last updated at Posted at 2015-11-05
本稿はCentOS+Apacheを前提に記載しています。
webサーバを構築する際にとりあえず押さえておく事項のメモです。
バーチャルホスト関係も今後記載予定。

webコンテンツ編集ユーザーの作成

※ webコンテンツ作成/編集可能ユーザーをwww-userとする。

#ユーザー追加
useradd www-user
#パスワード作成
passwd www-user

apache実行ユーザーの確認

httpd.confファイルにてUserGroupを確認する。

vi /etc/httpd/conf/httpd.conf

User apache
Group apache

ドキュメントルートの設定

パーミッションの設定

/var/www/html
chown -R www-user:apache /var/www/html
chmod -R 2770 /var/www/html

#ファイルアップロードスクリプト等を使用するディレクトリ
chown -R apache:apache /var/www/html/uploads
chmod -R 755 /var/www/html/uploads
3
8
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
3
8