What is chmod?

Panisetti prudhviraj
Analytics Vidhya
Published in
2 min readDec 30, 2021

--

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

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…

--

--

Panisetti prudhviraj
Analytics Vidhya

Passionate Full Stack Developer based in Germany with a strong advocacy for Python, Go. Let's connect on LinkedIn for a tech-centric journey!