Linux settings for files and permissions

Source: Internet
Author: User

The so-called file permissions, refers to the file access rights, including the file read, write, delete, execution, under Linux, each user has different permissions, ordinary users can only in their own home directory to write operations, and in the home directory, ordinary users can only find, read operations, How to handle the relationship between file permissions and users is the focus of this section.

View permissions properties for a file

Use the LS command to view the file and directory permissions information, without any parameters of the LS command only display file name, through "Ls–al" can display the file or directory permissions information, see the following output:

[Root@localhost oracle]# Ls-al

Total 92

Drwxr-xr-x 3 Oracle Oinstall 4096 OCT 2006 admin

Drwxr-xr-x 2 Oracle Oinstall 4096 Oct 18:22 bin

-rwxr-xr-x 1 root root 3939 Mar 2008. createtablespace.pl

Drwxr-xr-x 3 Oracle Oinstall 4096 OCT 2006 Flash_recovery_area

Drwxr-xr-x 2 Oracle oinstall 4096 June 15:18 Install

DRWX------2 Oracle oinstall 16384 June 01:10 Lost+found

drwxr-xr--3 Oracle Oinstall 4096 OCT 2008 Oradata

Drwxr-xr-x 6 Oracle Oinstall 4096 OCT 2006 Orainventory

Drwxr-xr-x 3 Oracle DBA 4096 OCT 2006 product

To provide a more detailed description of each attribute in the output above, the following figure lists the meaning of each column in the Oradata document:

The following is a concrete example of what each column means.

1. The first column shows the document type and execution permissions, 10 characters, divided into 4 parts, the following document Oradata permissions decomposition, as shown in the following figure

Then explain each of the sections as follows:

Document Type section:

Represents a directory when "D", a soft link when "L", a file when "-", or a serial port character device file when "C", and a block device file that is available for storage when "B". So, Oradata is a directory.

In the next three sections, three characters is a group, each character means: "R" means read-only, that is, "w" is writable, that is, write, "x" means executable, that is, execute, "-" to indicate that there is no such permission, that is null.

User section:

The second section is about setting the document owner (user) permission, and "rwx" means that the user has all the rights to read, write, and execute the Oradata directory.

Group section:

The third part is the set of user groups (group) permissions that the document belongs to, and "r-x" means that the user group has read and execute permissions to the Oradata directory, but does not have write permissions.

Others section:

The Forth part is a set of user rights other than the owner of the document, and "r--" means that other users or groups of users have only read access to the Oradata directory.

The document's operational permissions can be specified and changed, and the permissions of the file or directory may be changed through the chmod command, which is described in the following section.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.