File Permissions in Linux


File Permissions in Linux

Files and directories in DOS or Windows attributes have attributes as follows: A (archive), H (Hidden / hidden), R (Read-only/hanya read), and S (System). and Linux Only H and R, while for hidden filename begins with a dot, and for the Read-only attribute set in the permissions.


In the Unix / Linux, the files have the permissions (permissions), and possession (owner), which is included in the group. File permissions are a kind of permission to access the file. In Linux, file access can be arranged according to three categories:
• u: user (file owner)
• g: group (everyone that the group with the owners file)
• o: others (all others listed in the relevant Linux systems)

Type of file access permission there are three kinds, namely:
• r: read (to be read, including the copy)
• w: write (should be written, including modified)
• x: execute (be executed, eg if the filename is a program)

The command is used to change the file permissions are: chmod
How to use chmod:
• to create the file can not be read by others
chmod o-r [filename]
• to create the file can be executed by a group chmod g+ x [filename]
• to create the file can be read, write, execute by group chmod g+ rwx [filename]
• to make files readable only by the user
chmod go-r [filename]

File permissions seen in the visible detail file if done ls with l option (eg ls-l or ls-al). At the far left of each file looks small dash 10 pieces and combine well with the letter d, r, w, and x. If you filled all the looks are drwxrwxrwx.

The following table contains information from the file permission5:
If the position of the line - if not -
to:
1 d ---- d means that the directory is not the directory
2-r ----- can not be read by a user r meant to be read by the user
3 - w ----- not writable by the user w means it can be written by the user
4 - x ---- not be executed by the user x means it can be executed by the user
5 --- r ---- can not be read by a group r meant to be read by group
6 ---- w --- can not be written by a group w means group writable
7 ----- x --- can not be executed by a group x means group writable
8 ------ r - can not be read by others r meant to be read by others
9------- W- can not be written by others w means it can be read by others
10 ------ x can not be executed by others x means it can be executed by others
Related : File Permissions in Linux.