How to tell what the CHMOD value of a file/directory is
chmod
alters the permissions for a file or directory, you could allow full read/write access to a file or directory by running the following command:
|
|
You could do the same on a directory recursively:
|
|
But if we look at the directory listing of this path now, we can’t tell what integer value this affected:
How to get the CHMOD value
If we want to get the actual integer value back, we could use the stat
command and tell it what we want from it:
Each of the below command will now return a 777
back.