File types are

  1. Regular files
  2. directories
  3. character device files
  4. block device files
  5. Unix Domain Sockets
  6. Named Pipes
  7. Symbolic Links

Unix domain sockets and Named pipes are not supported by all systems.

Device files allow Unix Programs help to communicate with system hardware and peripherals.

File Attributes

setuid and setgid bits: The bits with octal values 4000 and 2000 are the setuid and setgid bits.

The sticky bit:

the bit with octal 1000 is called the sticky bit.

Permission Encoding For chmod
octal Binary Perms Octal Binary Perms
0 0 4 100 read
1 1 execute 5 101 read : execute
2 10 write 6 110 read:write
3 11 write-execute 7 111 read:write:execute

umask – permission encoding for umask