Chmod 計算ツール
Unix のファイルパーミッションを 8 進数(755)、記号表記(rwxr-xr-x)、チェックボックスの間で変換。setuid・setgid・スティッキービット、chmod コマンド、u+x などの式、umask に対応します。
Permissions
| Class | Read | Write | Execute | Value |
|---|---|---|---|---|
| Owner | 7 | |||
| Group | 5 | |||
| Others | 5 |
Run as the file's owner
Run as group / inherit group
Only owners delete (/tmp)
Notation
3 or 4 digits, e.g. 644 or 2775
Or paste an ls -l column like drwxr-sr-x
- Octal (4-digit)
- 0755
- ls -l
- -rwxr-xr-x
What it means
- Owner: can read, write and execute.
- Group: can read and execute.
- Others: can read and execute.
Common use: Directories and scripts.
Command
Applies to every file and folder inside. For mixed trees, prefer chmod -R a+rX or find … -type f/-type d.
chmod 755 deploy.sh
Try a chmod expression
Starts from the current mode (755). Clauses like u+x, go-w, a=rX, g=u or +t.
umask
Which permissions new files and folders get.
- New files
- 644 (rw-r--r--)
- New directories
- 755 (rwxr-xr-x)
このツールについて
所有者・グループ・その他のユーザーそれぞれに読み取り・書き込み・実行をチェックするか、644 や 2775 のような 8 進数のモードを入力するか、ls -l のパーミッション列(drwxr-sr-x)を貼り付けます。3 つの表記は常に同期し、ファイルまたはディレクトリについて誰が何をできるかをわかりやすい言葉で説明します。setuid、setgid、スティッキービット(s、S、t、T)に対応し、8 進数または記号形式の chmod コマンドを作成し、u+x,go-w や a=rX などの chmod 式が現在のモードをどう変えるかを表示し、umask によって新しいファイルやフォルダーに付与されるデフォルトのパーミッションを算出します。777 や誰でも書き込めるファイルなど、危険なモードには警告が表示されます。
chmod パーミッションの計算方法
パーミッションを 8 進数のモードと chmod コマンドに変換します。
- 1
パーミッションを設定
所有者・グループ・その他に読み取り・書き込み・実行をチェックするか、755 や rwxr-xr-x を入力します。
- 2
必要に応じて特殊ビットを追加
setuid、setgid、またはスティッキービットをオンにします。
- 3
コマンドをコピー
ファイル名を入力し、chmod コマンドをコピーします。