What is chmod?
chmod is used to change the permissions of files or directories. On Linux and other Unix-like operating systems, there is a set of rules for each file which defines who can access that file, and how they can access it. These rules are called file permissions or file modes. The command name chmod stands for “change mode”, and it is used to define the way a file can be accessed.
In chmod there are basically three types of users:
- User, meaning the user who owns the file
- Group, meaning the files defined ownership group
- Other, meaning everyone else
and each of these types of users can have three types of file access:
- Read (r), meaning the ability to look at the contents of a file
- Write (w), meaning the ability to change the contents of a file
- Execute (x), meaning the ability to run the contents of a file
Let’s say you are the owner of a file named myfile, and you want to set its permissions so that:
- the user can read, write, ande xecute it;
- members of your group can read ande xecute it; and
- others may only read it.
This is complex to remember and digest sometimes. All you need is the chmod calculator.
We hope you found this article insightful. Talk to us drop your comments and suggestions in the box below.