What is chmod?
When I started building applications or developing scripts for automation in Linux environment, I came across a keyword “chmod” to give permissions for the files to execute, read or write depends on the scenario. In this article, we will look into the usage of chmod and its parameters.
chmod
This is a command in Linux/Unix distribution to change the attributes and give permissions to a file/folder.
chmod literally means change mode
Basically, chmod gives permissions to three categories : user, group and others.
user: admin/user that create the file/folder
group: the users from group that admin is member
other: all other users
There are three types of permissions. Depends on the requirements the file/folder permissions can be changed with the help of chmod.
r — read
w — write
x — execute
How to change the permissions of the file?
As per the categories and the permission types, the functionality varies. Here are few examples of using chmod:
Consider I have a file readme.txt
chmod 777 readme.txt — This allows all the users(user, group and others) with all the permissions
chmod 666 readme.txt — This allows all…