LINUX File / Folder Permission

Farihin Muhamad
0

In LINUX, each file and folder/directory stored have such a special atributes (in this case permissions). Linux permission symbolized with r, w, x, and - (r for read, w for write, x for execute, - for unspecified).
a) read, user can see the contents of the file but not modified it.
b) write, user can make a changes to the file/folder.
c) execute, user can run/open the file.
d) dash, not assign a permission.

Each file/folder devide in to 3 user permissions, the first is user (file owner), second is group user (member of a group user), and three other user (all user not in the owners group):

If you step up to the linux then you go to the shell and list a folder you might get this view:
First 10 characters from that list was file/folder permission.

In LINUX, to change a permission there is a command called “chmod” or we can call it change file permission mode. It’s used to change the permission on a file by modifying the file mode bit. You can type: chmod $$$ filename ($$$ = your permission value).

Now let's take a time to learn about permission value. To change this permission value we have two method to it, there is oktal and symbolic notation:
1. With Oktal notation (ex: 755, 644, 777)
Oktal notation use number to represent a permission value. Read value = 4, write value = 2, execute value = 1, and unsign value = 0. Look at the table below:

2. Symbolic notation (ex: a=r, g+w, o-x)
Symbolic notation using symbol and a letter to represent a value, look at the table below:

Now let's compare these two method:

Which one do you prefer, symbolic/octal? let me know on the comment below.

Post a Comment

0Comments

Post a Comment (0)