Permission String of Files

Permission String Interpretation

The first character denotes the type of file

  • d the directory is a folder
  • l the directory is a symlink
  • - the directory is a regular file

The other characters are the file permissions. The first set represents the user class. The second set represents the group class. The third set represents the others class.

  • r if reading is permitted, - if it is not.
  • w if writing is permitted, - if it is not.
  • x if execution is permitted, - if it is not.
$ ls -l

drwx------@ 3  mimigonz staff 96   Jan 15 2021 Applications
drwx------@ 52 mimigonz staff 1664 Sep 15 15:10 Desktop
lrwxr-xr-x   1 mimigonz staff      20 Jul 14 13:12 ssh-link -> /Users/mimigonz/.ssh
drwx------+ 18 mimigonz staff 576  Sep 10 16:33 Documents
drwxr-xr-x@ 6  mimigonz staff 192  Oct 9 2015 Extras

Examples

Symbolic notation Numeric notation English
---------- 000 no permissions
-rwx------ 700 read, write, & execute only for owner
-rwxrwx--- 770 read, write, & execute for owner and group
-rwxrwxrwx 777 read, write, & execute for owner, group and others
---x--x--x 111 execute
--w--w--w- 222 write
--wx-wx-wx 333 write & execute
-r--r--r-- 444 read
-r-xr-xr-x 555 read & execute
-rw-rw-rw- 666 read & write
-rwxr----- 740 owner can read, write, & execute; group can only read; others have no permissions

|