To remove certain permissions from a file, use this command:
where who specifies from which type of user these permissions are to be removed:
u to change the owner’s (“user’s”) permissions;
g to change group permissions;
o to change world (“other”) permissions; or
a to change all permissions: owner, group and world.
and value says which permissions to remove:
r for read permission;
w for write permission; and
x for execute permission.
- To remove world write permission for file foo:
To remove group and world read and write permissions from file bar:
To add execute permission to all:
This is much more intuitional the “755” way.