252 You Are Here
chmod a-x tigger
to remove execute access to all.
Here’s what happens now when we try to cd to into tigger:
[billy@localhost billy]$ cd tigger
bash: tigger: Permission denied
[billy@localhost billy]$
Let’s restore ours and our group’s access.
chmod ug+x tigger
Now, if we check our work with ls -dl we’ll see that only others will be denied access to tigger.
16.13 Fun with Numbers in chmod
Remember when we made a reference to the “shorthand” method of chmod? Here’sanotherwayto
change permissions; it may seem a little complex at first - especially if math isn’t your strong suit.
Let’s go back to the original permissions for sneakers.txt.
-rw-rw-r-- 1 billy billy 150 Mar 19 08:08 sneakers.txt
Each permission setting can be represented by a numerical value:
r =4
w =2
x =1
- =0
When these values are added together, the total is used to set specific permissions - more specific
than changing permissions with the alphabetical “shorthand.”
In sneakers.txt, then, here are the numerical permissions settings:
- (-rw) (-rw) (r--)
|||
0+4+2 0+4+2 4+0+0
Comments to this Manuals