Removing Permissions

In order to remove read write permissions given to a file, use the following syntax:

$ chmod o-rw example.txt

For our file example.txt, we can remove read write permissions using chmod for group by running the following command:

$ chmod g-rx example.txt

To remove chmod read write permissions from the group while adding read write permission to public/others, we can use the following command:

$ chmod g-rx, o+rx example.txt

But, if you wish to remove all permissions for group and others, you can do so using the go= instead:

$ chmod go= example.txt
Comments