interview-prep
  • Numeric: rwxrwxrwx = 777 (owner, group, others). r=4, w=2, x=1.
  • Common modes: 644 (file readable by all, writable by owner), 755 (dir or executable readable+executable by all, writable by owner), 600 (private file).
  • chmod 644 file.txt — set permissions
  • chown user:group file.txt — change owner and group
  • SUID (4xxx) — file runs with owner's privileges (e.g., passwd runs as root)
  • SGID (2xxx) — file runs with group's privileges; on a directory, new files inherit the group
  • Sticky bit (1xxx) — on a directory, only owners can delete their own files (used on /tmp)

My notes