Permissions

Permissions #

ls shows the file and directory type and permissions of in the first 10 characters.

Looks something like: -rw-r--r-- (just a file, readable and writeable by the owner) or lrwxrwxrwx (symbolic link - see below).

The first character is the type.

Attribute Type
- Regular file
d Directory
l Symbolic link
c character special file -> device that handle data in streams (I don’t use this often)
b block special file -> devices that handle data in blocks (I don’t use this often)

The next nine characters are the permissions, and is structured <Owner> - <Group> - <World>, where each block is 3 characters. These are called file modes.

Attribute Files Directories
r Readable Directory’s contents are listable
w Writable Files within are creatable, deletable, and namable
x Executable Enterable (e.g., cd <directory>