LoginSignup
1
3

More than 5 years have passed since last update.

chmod備忘録

Last updated at Posted at 2018-08-01

chmod

$ chmod アクセス権限 ファイル名
$ chmod 777 hogehoge/hugahuga.txt
$ chmod o-x hogehoge/hugahuga.txt
$ chmod a=xwr,g-x,o-xw hogehoge/hugahuga.txt

権限

権限種別 番号 内容
r 4 読込/展開
w 2 書込/書換/追加/削除
x 1 実行

八進

番号 表記
0 ---
1 --x
2 -w-
4 r--
3 -wx
5 r-x
6 rw-
7 rwx

対象

表記 内容
u 所有者
g グループ
o その他
a 全て

ls-lの説明

例
$ ls -l
dr-xr-xr-x. 2 root root  4096   6月  6 12:15 2018 hogehoge
-rwxr-xr-x  1 root root  27776  3月 23 03:52 2017 hugahuga

ls-l.png

ファイルの種類と許可属性表記
種類 所有者 グループ その他
d rwx r-x r--
- 421 4-1 4--
- 7 5 4
ディレクトリ種別
ls -lでの表示 意味
- 普通のファイル
d ディレクトリ
l シンボリックリンク
c キャラクタ型デバイスファイル(特殊ファイル)
b ブロック型デバイスファイル(特殊ファイル)
1
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
1
3