To change the permissions of a file or directory
• Syntax :
chmod assignment_expression filename
• Assignment expression comprises
Category of users
Granting or denial of permission
Types of users
to visit www.excavatorinfo.com
2. chmod COMMAND
• To change the permissions of a file or directory
• Syntax :
chmod assignment_expression filename
• Assignment expression comprises
Category of users
Granting or denial of permission
Types of users
3. • Owner - owner of the file or directory.
• Group - group of related users.
• All/Other- Other users.
Types of Permissions
• Read - read the file or list files in the directory
• Write - add new content to a file or add newfiles to the directory
• Execute - access the contents of a file or access files in the directory
Types of Users
7. Chmod
SINGLE USER:
• Example :
• Cmd : chmod u + r filename
The above command grants permission to a single user to read the file .
MULTIUSERS:
• Example :
• Cmd : chmod u + rw , g = x ,o –w filename
• The above command grants permissions to multiple users
8. OCTAL NOTATION
Cmd : chmod 761 filename
Cmd : chmod u = rwx, g = rw,o = x filename
The above commands are equivalent to each other.
11. Chown command
To change the owner / user of the file / directory.
• An administrator command
• Only the root user can change the owner of the
file / directory.
• Syntax:
chown [options] newowner file/dir name
12. Chgrp command
• To change the group of a file / directory.
• An administrator command.
• Syntax :
chgrp [options] newgroup file/dirname