16.13 Fun with Numbers in chmod 253
The total for the user is six, the total for the group is six and the total for others is four. The permis-
sions setting, then, is read as 664.
If we want to change sneakers.txt so those in our group didn’t have write access, but could still
read the file (as shown in Figure 16.20), we’ll have to remove the access by subtracting 2 from that set
of numbers.
The numerical values, then, would become six, four and four – or 644.
So we can type:
chmod 644 sneakers.txt
Let’s check our changes by listing the file (ls -l sneakers.txt):
-rw-r--r-- 1 billy billy 150 Mar 19 08:08 sneakers.txt
Figure 16.20: Removing group write permissions
And there it is; now, neither the group nor others have write permission to sneakers.txt.To
return the group’s write access for the file, we can just add the value of w (2) to the second set of
permissions.
Comments to this Manuals