chmod
. There are
quite a few ways to use chmod
. For beginners, it is best to use
the symbolic method. The following is an example to remove world read
permission from a file called xyz
:
chmod o-r xyz
What does o-r
mean? It means the following:
o
: others
-
: remove
r
: read permission
In general, the permission change symbol is as follows:
u
for user, g
for group and o
for others
+
for add, -
for remove and =
``change to''
r
for read, w
for write, x
for execute
There can be multiple Permission change symbols separated by commas (but no space in between).
Of course, the chmod
is more capable than this. Please refer to the
man
page of chmod
for more details.