Jordan Savant # Software Engineer

Textual representation "-rwxr--r-":
    10 characters: file type, owner perms, group perms, other perms
    d = Directory (first bit)
    - = File (first bit)
    r = Read access
    w = Write access
    x = Execute access
    - = No access

Numeric represenation "644":
    Octal   Text    Binary
    0       ---     000
    1       --x     001
    2       -w-     010
    3       -wx     011
    4       r--     100
    5       r-x     101
    6       rw-     110
    7       rwx     111

Access Type         File                            Directory
Read                If file contents can be read    If the directory list can be obtained
Write               If user or process can write    If user or process can change directory contents, create files etc
Execute             If file can be executed         If user or process can access directory, i.e. cd into it

UNIX Special Bits
    SUID or setuid:
        Change user ID on execute. If bit set, when file executed by user, the process will have same
        rights as the owner of the file being executed.
    SGID or setgid:
        Change group ID on execute. If bit set, when file executed by user, the process will have same
        rights as the group of the owner of the file.
        For directories, it may mean that when a new file is created it will inherit the group of the
        directory, not the user who created the file.
    Sticky Bit:
        Used to trigger process to "stick" in memory after it is finished, now obsolete.
        Currently its use is system dependent and mostly used to suppress deletion of the files that
        belong to the other users in the folder you have "write" access too.

    Numeric Representation:
        Octal   Binary  Meaning
        0       000     setuid, setgid, and sticky bits are cleared
        1       001     sticky bit is set
        2       010     setgid is set
        3       011     setgid and sticky bits set
        4       100     setuid is set
        5       101     setuid and sticky bits set
        6       110     setuid and setgid bits set
        7       111     setuid, setgid and sticky bits are set

    Textual Representation:
        SUID
            Replaces "x" in the ownder permissions to "s", if owner has execute permissions, or to
            "S" otherwise.
            -rws------  both ownder execute and SUID are set
            -r-S------  SUID is set, but owner execute not set
        SGID
            Replaces "x" in thr group permissions to "s", if group has execute permissions, or to
            "S" otherwise.
            -rwxrws---  both group execute and SGID are set
            -rwxr-S---  SGID set, but group execute is not
        Sticky
            Replaces "x" in the others permissions to "t", if others have execute permissions, or to
            "T" otherwise.
            -rwxrwxrwt  both others execute and sticky bit are set
            -rwxrwxr-T  sticky bit is set, but others execute is not set