Back to course

35. Changing Permissions: Using Symbolic Notation (UGO)

Linux Basics: From Zero to CLI Hero

Granular Permission Changes

Symbolic notation allows you to add or remove specific permissions without knowing the current state, using symbols for the affected parties and actions.

Symbolic Components

  1. Who: u (user/owner), g (group), o (others), a (all: ugo).
  2. Action: + (add permission), - (remove permission), = (set permission exactly).
  3. Permission: r, w, x.

Examples

  1. Add execute permission to the owner (user): bash $ chmod u+x my_script.sh

  2. Remove write permission from the group and others: bash $ chmod go-w sensitive_file.txt

  3. Set the permissions for everyone exactly to read-write: bash $ chmod a=rw private_data

Best Practice: Use Symbolic notation (u+x) when you want to make a small, precise change. Use Octal notation (755) when setting the permissions from scratch.