Linux file properties and how to modify file properties

Source: Internet
Author: User
Tags file type file readable

Ls-al: Displays file name and related properties and lists all file detailed permissions and properties

Dr-xr-x---. 7 root root 4096 Apr3 12:31.

Permissions Connection owner user group file capacity modification date file name

The first character indicates that the file is "directory, file, or connection file, etc."

D: Catalogue

-: File

L: Link File

B: Interface devices available for storage in device files

C: Serial port device in the device file

[d] [r-x] [r-x] [---]

File type file permission file permissions for group permissions Other people's permissions on this file

R: Readable w: writable x: Executable-: No permissions

The directory test owner is root, the owning user group has the Root,root user to this directory has the readable, writable executable permission, the root user group may enter the secondary directory, but cannot perform the write operation, the other user can enter the secondary directory, but cannot perform the write operation.

When modifying file and directory attributes, it is important to understand what data can be changed and what data cannot be changed.

How to change properties and permissions

Chown modifying the owner of a file

-R user name: Group name directory recursively modify permissions for directories and permissions for all files under directory

Chgrp modifying the genus Group of a file

Chmod Modifying file permissions

Number Types Change Permissions:

The file permission character is [-rwxrwxrwx] Nine permissions Three is a group, available numbers represent individual permissions

R=4

w=2

X=1

Each individual privilege score needs to accumulate, such as the permission is [-rwxr-xr--], the score is

Owner=7

Group=5

Other=4

So when we set the permission change, the file permission number is 754

Symbol Type Change permissions:

U owner + Join F

Group G-Remove W file or directory

Chmod o Other people = set X

A everyone

Per-person writable permissions

Linux file properties and how to modify file properties

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.