Changing the file permissions using the chmod command
Change Mode or chmod is a Linux command that is used to modify the access permissions of files and directories. Everybody wants to keep their data secure and properly organized. For this reason, Linux has a concept that associates owners and groups with every file and directory. These owners and groups have different permissions to access a particular file.
Getting ready
Before we take a look at the different usages of the chmod
command, we need to know the different types of users and the symbolic representation used:
u
is used for user/ownerg
is used for a groupo
is used for others
Now, create a file called testfile.txt
, to try out the different commands of chmod
.
How to do it…
Now, we will take ...
Get Practical Linux Security Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.