Modifying Permissions with chmod
The chmod
command is used to change the permissions of a file or directory.
chmod permissions file
permissions
: This is where you specify the permissions you want to set. It can be represented using symbols (e.g.,u+rw
for adding read and write permissions for the user) or in octal form (e.g.,755
for setting permissions).file
: This is the name of the file or directory you want to modify.
For example, to give read and write permissions to the user, you can use:
chmod u+rw file.txt