31.Lock DigitalRoom

In Linux, all directories and files have access permissions. You can use chmod to set your preferred access rights for different users. But what decides their default permissions? Let’s talk about umask.


All directories and files have flags called mode bits that decide whether they can be read, written to, or executed. Executing a file means running it like a program or a script. For a directory, you must be able to “execute” a directory to cd into it. Collectively the bit mode settings are called the permissions of the directory or file.

There are three sets of permissions. One set is for the owner of the directory or file. Unless the ownership has been changed with chown, the owner is the person who created the directory or file.