0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ファイルパーミッション

Last updated at Posted at 2025-12-03

ファイルパーミッションとは

  • UnixやLinuxなどのOSにおいて、ファイルやディレクトリに対して「誰が」「何ができるか」というアクセス権限を定義する仕組みのこと

パーミッションコードの仕組み

  • パーミッションの数字はオーナー、グループ、その他を表している
    オーナー:ファイルを作成したユーザー自身
    グループ:オーナーが所属するグループのユーザー
    その他:システム上のすべてのユーザー

権限の種類

  • 権限はr,w,xの3種類
    r(read):4:読み取り
    w(write):2:書き込み
    x(execute):1:実行

数字の計算

  • 3桁の数値は各権限の合計で決まる
    7 (rwx): 4+2+1=7 (すべて許可)
    6 (rw-): 4+2+0=6 (読み取りと書き込みのみ許可)
    5 (r-x): 4+0+1=5 (読み取りと実行のみ許可)
    0 (---): 0+0+0=0 (すべて拒否)
0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?