Title: Setting Permissions (chmod)
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review > Section: Learning Modules

Permissions can be changed with chmod. The first example gives the user owner execute permissions.

- paul@laika:~/perms$ ls -l permissions.txt
  - Results: -rw-r--r-- 1 paul paul 0 2007-02-07 22:34 permissions.txt
- paul@laika:~/perms$ chmod u+x permissions.txt
- paul@laika:~/perms$ ls -l permissions.txt
  - Results: -rwxr--r-- 1 paul paul 0 2007-02-07 22:34 permissions.txt

Even fishy combinations are accepted by chmod.

- paul@laika:~/perms$ chmod u=rwx,ug+rw,o=r permissions.txt
- paul@laika:~/perms$ ls -l permissions.txt
  - Results: -rwxrw-r-- 1 paul paul 0 2007-02-07 22:34 permissions.txt

(Source: Linux Fundamentals, Cobbaut, 218-219)