Recent Changes

2021-11-21
2021-07-07
2020-07-11
2019-12-14
2019-10-12

Latest File Release

codes (triptest 1.0.1)2010-08-13 20:57
plugins (spamblock 1.2.0)2011-12-12 21:35
zerochplus (0.7.5)2022-03-23 00:00
zerochplus dev (dev-r364)2012-10-27 18:00

Wiki Guide

Side Bar

パーミッションの設定

パーミッションとは?

パーミッションのパの字もわからない人はこちらを見てください

FTPクライアントによるパーミッション変更方法

Windows用の代表的なFTPクライアントのパーミッションの設定に関する解説ページ

パーミッション概要

以下の表中で「※」のついた項目はパーミッションの設定だけでは不十分ということを表しています。
.htaccessでアクセス制限をかけるなどして、ブラウザからアクセスされないようにすることが望ましいです。
また非suEXEC環境では、ユーザーがFTP等から作成したファイルと、スクリプトから生成されたファイルでは、ファイルの所有者が異なるので必然的にパーミッションも異なってきます。

ディレクトリ

ディレクトリの種類suEXEC (A)suEXEC (B)非suEXEC (A)非suEXEC (B)ブラウザからアクセスファイルの作成・削除具体例
プログラム管轄外のディレクトリ701710705750許可不可自作サイト用ディレクトリ, test/, ...
生産ファイルを置くディレクトリ701710707770許可許可掲示板設置Dir(親Dir), bbs1/, dat/, ...
モジュール用ディレクトリ700700705※750※拒否不可module/, mordor/, perllib/, ...
設定ファイル用ディレクトリ700700707※770※拒否許可info/, plugin_conf/, pool/, log/, ...
ファイル一覧を公開するディレクトリ705750707770許可許可kako/*, ...

ファイル

ファイルの種類suEXEC (A)suEXEC (B)非suEXEC (A)非suEXEC (B)ブラウザからアクセスプログラムから編集具体例
CGIプログラムファイル700700705750許可不可bbs.cgi, admin.cgi, ...
モジュールファイル600600604※640※拒否不可*.pl, *.pm
プログラム用の設定ファイル600600606※660※拒否許可CGIプログラム以外の*.cgi, pool/*.cgi, セッションファイル, ...
プログラムの生産ファイル604640606660許可許可bbs/index.html, subject.txt, *.dat, ...
プログラム管轄外のファイル604640604640許可不可自作ページ用ファイル, kanban.gif, .htaccess, admin.css, ...

パーミッション設定例

レンタルサーバの場合,CGIスクリプトのパーミッションに設定するべき値は各レンタルサーバのウェブサイトにあるヘルプページに書かれることが多いです。
ヘルプに書いてある場合は,その値を使ってみてください。

補助

  • 0.7.4にtemplate/ディレクトリは存在しません
    • 今後のバージョンアップで出来る予定だったとさ
  • perllibディレクトリのパーミッション設定について
    • [xxx] perllib/
      • [xxx] */ (←子ディレクトリ(の子ディレクトリ)も同じように設定する)
      • [xxx] *.* (←子ディレクトリ内のファイルも同じように設定する)
      • [xxx] index.html (403用)

suEXECで動作するサーバー

設置しているサーバーが「さくらのレンタルサーバ」「ロリポップ」「XREA」「CORESERVER.JP」「@pages」「land.to」などの一般的な共用レンタルサーバーから提供されている場合はこちらの設定です。
最近のレンタルサーバーはセキュリティのためほとんどがsuEXECで動作しています。

Type-A

  • 「@PAGES」 www10.atpages.jp ※2013/05/06
  • 「@PAGES」 www51.atpages.jp ※2013/05/06
  • 「land.to」 ***.so.land.to ※2013/05/06
  • 「land.to」 ***.me.land.to ※2013/05/08
  • 「ゼロウェブサーバー」 ***.atumari.net ※2013/05/08
  • 「レオサーバー」 www.***.test.leosv.jp ※2013/05/18 お試し

各ファイルのパーミッション

  • [701] 親ディレクトリ(設定できる場合)
    • [701] test/
      • [701] datas/
        • [604] *.*
        • [600] index.html (403用)
      • [700] info/
        • [700] .session/
          • [600] index.html (403用)
        • [600] *.cgi
        • [600] index.html (403用)
      • [700] module/
        • [600] *.pl
        • [600] index.html (403用)
      • [700] mordor/
        • [600] *.pl
        • [600] index.html (403用)
      • [700] plugin/
        • [600] 0ch_*.pl
        • [600] index.html (403用)
      • [700] plugin_conf/
        • [600] 0ch_*.cgi
        • [600] index.html (403用)
      • [700] perllib/
        • [700] */
        • [600] *.*
        • [600] index.html (403用)
      • [700] template/
        • [600] *.tt
        • [600] index.html (403用)
      • [700] *.cgi
      • [600] index.html (403用)

管理画面のパーミッション設定

datファイルパーミッション604
テキストファイルパーミッション604
ログファイルパーミッション600
管理ファイルパーミッション600
停止スレッドファイルパーミッション404
管理ディレクトリパーミッション700
掲示板ディレクトリパーミッション701
ログ保存ディレクトリパーミッション700
過去ログディレクトリパーミッション705

Type-B

  • 「wkey.me」 ***.wkeya.com (SuEXEC有効) ※2013/05/06

各ファイルのパーミッション

  • [710] 親ディレクトリ
    • [710] test/
      • [710] datas/
        • [640] *.*
        • [600] index.html (403用)
      • [700] info/
        • [700] .session/
          • [600] index.html (403用)
        • [600] *.cgi
        • [600] index.html (403用)
      • [700] module/
        • [600] *.pl
        • [600] index.html (403用)
      • [700] mordor/
        • [600] *.pl
        • [600] index.html (403用)
      • [700] plugin/
        • [600] 0ch_*.pl
        • [600] index.html (403用)
      • [700] plugin_conf/
        • [600] 0ch_*.cgi
        • [600] index.html (403用)
      • [700] perllib/
        • [700] */
        • [600] *.*
        • [600] index.html (403用)
      • [700] template/
        • [600] *.tt
        • [600] index.html (403用)
      • [700] *.cgi
      • [600] index.html (403用)

管理画面のパーミッション設定

datファイルパーミッション640
テキストファイルパーミッション640
ログファイルパーミッション600
管理ファイルパーミッション600
停止スレッドファイルパーミッション440
管理ディレクトリパーミッション700
掲示板ディレクトリパーミッション710
ログ保存ディレクトリパーミッション700
過去ログディレクトリパーミッション750

非suEXECのサーバー

suEXECを設定していない自宅サーバーやVPSの場合はこちらの設定です。

Type-A

  • 自宅サーバー CentOS 6.3 Apache/2.2.15 (suEXEC無効) ※2013/05/13

各ファイルのパーミッション

  • [707] 親ディレクトリ
    • [705] test/
      • [705] datas/
        • [604] *.*
        • [600] index.html (403用)
      • [707] info/
        • [707] .session/
          • [600] index.html (403用)
        • [606] *.cgi
        • [600] index.html (403用)
      • [705] module/
        • [604] *.pl
        • [600] index.html (403用)
      • [705] mordor/
        • [604] *.pl
        • [600] index.html (403用)
      • [705] plugin/
        • [604] 0ch_*.pl
        • [600] index.html (403用)
      • [707] plugin_conf/
        • [606] 0ch_*.cgi
        • [600] index.html (403用)
      • [705] perllib/
        • [705] */
        • [604] *.*
        • [600] index.html (403用)
      • [705] template/
        • [604] *.tt
        • [600] index.html (403用)
      • [705] *.cgi
      • [600] index.html (403用)

管理画面のパーミッション設定

datファイルパーミッション606
テキストファイルパーミッション606
ログファイルパーミッション606
管理ファイルパーミッション606
停止スレッドファイルパーミッション404
管理ディレクトリパーミッション707
掲示板ディレクトリパーミッション707
ログ保存ディレクトリパーミッション707
過去ログディレクトリパーミッション707

Type-B

  • 「wkey.me」 ***.wkeya.com (SuEXEC無効) ※2013/05/06

各ファイルのパーミッション

  • [770] 親ディレクトリ
    • [750] test/
      • [750] datas/
        • [640] *.*
        • [600] index.html (403用)
      • [770] info/
        • [770] .session/
          • [600] index.html (403用)
        • [660] *.cgi
        • [600] index.html (403用)
      • [750] module/
        • [640] *.pl
        • [600] index.html (403用)
      • [750] mordor/
        • [640] *.pl
        • [600] index.html (403用)
      • [750] plugin/
        • [640] 0ch_*.pl
        • [600] index.html (403用)
      • [770] plugin_conf/
        • [660] 0ch_*.cgi
        • [600] index.html (403用)
      • [750] perllib/
        • [750] */
        • [640] *.*
        • [600] index.html (403用)
      • [750] template/
        • [640] *.tt
        • [600] index.html (403用)
      • [750] *.cgi
      • [600] index.html (403用)

管理画面のパーミッション設定

datファイルパーミッション666
テキストファイルパーミッション666
ログファイルパーミッション666
管理ファイルパーミッション666
停止スレッドファイルパーミッション444
管理ディレクトリパーミッション777
掲示板ディレクトリパーミッション777
ログ保存ディレクトリパーミッション777
過去ログディレクトリパーミッション777

※ファイルの所有者の問題でotherに権限を持たせています。

Windowsサーバー

アクセス制御リスト(ACL)によるパーミッション管理

IISやCygwinのApache+Perlなど、NTFSのアクセス制御(ACL)をしっかり管理できる場合はLinuxと同様のパーミッション設定を行ってください。

その他

ACLによるアクセス制御ができない、あるいは分からない場合は、Windowsでサーバーを立てて掲示板を公開するのは推奨できません。テストまでに留めておきましょう。

ここを読んでもわからない場合

ぜろちゃんねるプラス開発@38ちゃんねる の ぜろちゃんねるプラス質問スレ で聞いてください。