0% found this document useful (0 votes)
2 views5 pages

Chmod Command

The document explains how to set file and directory permissions in Linux using the 'chmod' command. It details both symbolic and numeric methods for changing permissions for users, groups, and others. Examples are provided to illustrate how to apply different permission settings using both methods.

Uploaded by

bechangakim9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Chmod Command

The document explains how to set file and directory permissions in Linux using the 'chmod' command. It details both symbolic and numeric methods for changing permissions for users, groups, and others. Examples are provided to illustrate how to apply different permission settings using both methods.

Uploaded by

bechangakim9
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

How to set

File & Directory


Permissions in Linux
using “chmod”
command
File & Directory Permissions
How to Change File/Directory Permissions in Linux for the user (u), group(g) and others (o)

• chmod u+rwx filename

• chmod u-r filename

• chmod g+w filename

• chmod g-wx filename

• chmod o+w filename

• chmod o-rwx filename


To Change Permissions in Numeric Code in Linux
• 0 = No Permission
• 1 = Execute
• 2 = Write
• 4 = Read
Basically, you add up the numbers depending on the level of permission you want
to give.

Permission numbers are:


0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r-
5 = r-x
6 = rw-
7 = rwx
For example:

• chmod 777 [Link] will give read, write, and execute permissions for user, group &
others.

• chmod 700 [Link] will give read, write, and execute permissions for the user only.

• chmod 327 [Link] will give write and execute permission for the user, write for the
group, and read, write, and execute for others.

You might also like