Linux File Permissions Summary

Source: Internet
Author: User

Ls-l The file attributes shown are a total of seven fields

The first field is the file permission, a total of 10 bits, the 1th bit represents the file type (file (-), directory (d), link (l))
The 234-bit represents the owner permission rwx, if the permission is not available-
567-bit represents group permissions
890-bit representation of other user rights

The second field is a link number

The third field represents the owner account of the file or directory

The fourth field indicates the group to which the file belongs

The fifth field represents the file size, the default unit B

The Sixth field indicates the creation date or the most recent modification date

The Seventh field represents the file name if there is a "." Before the file name. Indicates that the file is a "hidden file"

2. Meaning of file permissions

R (Read): Readable file contents

W (Write): Can edit, add or modify the contents of the file, can not be deleted

X (EXecute): Executable

3. Meaning of directory permissions

R (Read contents in directory): Can query file name under directory

W (Modify contents of directory): Change directory structure list, new, delete, rename, and move file directories

X (Access directory): Indicates that the user can switch to the directory

If the Open directory for others to browse, at least need to give r&x permission, but W permissions can not give

4. Changing file properties and Permissions

Modify file permissions include symbolic and digital methods, and the R,W,X scores in the digital method are 4,2,1

CHGRP: Change the user group that the file belongs to, the user group must be in/etc/group

Chown: Change the file owner, the user must be in/etc/passwd

chmod: Changing user permissions

5.Linux File Name Restrictions

A single file or directory with a maximum length of 255 characters, full path name and full file name of the directory maximum length of 4,096 characters

Linux File Permissions Summary

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.