Change Permissions in Numeric Code in Linux
You may need to know how to change permissions in numeric code in Linux, so to do this you use numbers instead of “r”, “w”, or “x”.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.
example of changing permissions in numeric code in Linux
Permission numbers are:
0 = ---
1 = --x
2 = -w-
3 = -wx
4 = r-
5 = r-x
6 = rw-
7 = rwx
For example:
chmod 777 foldername will give read, write, and execute permissions for everyone.
chmod 700 foldername will give read, write, and execute permissions for the user only.
chmod 327 foldername will give write and execute (3) permission for the user, w (2) for the group, and read, write, and execute for the users.
Comments
Post a Comment