Linux system file permissions and access mode introduction

  

Linux system different files, have different permissions. This is for security considerations when storing files, and it is also for smoother access and scheduling between Linux modules. This article introduces you to the Linux system file permissions and access mode.

Permissions

owner permissions u: operating
owner of the file can be performed

group permissions g: file belongs to a user group can perform operations

External Permissions o: (Other Permissions): What other users can do.

Viewing File Permissions

Use the ls -l command to view information related to file permissions:

$ls -l /home/amrood

- Rwxr-xr-- 1 amrood users 1024 Nov 2 00:10 myfile

drwxr-xr--- 1 amrood users 1024 Nov 2 00:10 mydir

The first column contains the files Or the permissions of the directory.

The characters in the first column can be divided into three groups, each group has three, each character represents different permissions, namely read (r), write (w) and execute (x) :

The first set of characters (2-4) indicates the permissions of the file owner, and -rwxr-xr-- indicates that the owner has read (r), write (w), and execute (x) Permissions.

The second set of characters (5-7) indicates the permissions of the user group to which the file belongs, and -rwxr-xr-- indicates that the group has read (r) and execute (x) permissions but is not written. Permissions.

The third set of characters (8-10) indicates the permissions of all other users, and rwxr-xr-- indicates that other users can only read (r) files. Previous1234Next page Total 4 pages

Copyright © Windows knowledge All Rights Reserved