1.4. Changing permission bits

You can change the permission bits of files you own to whatever you feel comfortable with. You have to ask yourself which users need access to your files (and this also includes directories that you own). You can change the permission bits using the command chmod. This command can be used in a short way using the absolute mode or a long way using the symbolic mode. We’ll look at the symbolic mode first.

1.4.1. Symbolic mode

The general format of the chmod command is

chmod [who] operator [permissions] filename 

who means:

u The user permissions
g The group permissions
o The other permissions
a Means all (user, group and other)

operator means:

+ Add a permission
- Take away a permission
= Set permissions

permission ...

Get Linux and Unix Shell Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.