Linux File and folder permissions

Source: Internet
Author: User

Universal Linux basic knowledge, Linux files and folder permissions, do not move on 777 permissions. The online tutorial is too complex to be wordy, briefly summarized as follows ...
One, view Linux file permissions

Ls-l (General)
LL (Ubuntu applies, equals Ls-al)

Ii. Permission Identifiers

R (Read), W (write), X (Execute)
4 (Read), 2 (write), 1 (performed)

Note: The directory must have executive rights to read

Second, modify the Linux file permissions

Method One

Chmod-r 777 dir/
-R Change dir directory and all sub files and folders within Dir
777 refers to the "file belongs to the user, belong to the user group, other users" to read, write, execute.

Method Two

chmod parameters: A (user and group), U (user), G (Group), 0 (other users)
chmod operator: + (plus),-(minus), = (given)

chmod +x file.txt (user, group, other user, plus execution)
chmod u+x file.txt (user, plus executive right)

Third, Linux common file permissions

777 (Read and write execution, read/write execution, read and write execution)
755 (Read and write execution, reading execution, read execution)
644 (Read and write, reading, reading)
400 (read, prohibit, prohibit

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.