Linux file and Directory permissions detailed introduction _linux

Source: Internet
Author: User

Linux file and Directory permissions interpretation

  

How to set permissions for Linxu files and directories

  

Character notation

  

1) Ls-l: View permissions for all files in the directory

2 chmod u=r File: Assign the current (user user) permissions of the file to writable mode

3 chmod g=wrx File: Assigns the current (group GRUOP) permissions of the file files to writable, readable, executable mode

4 chmod g-x file: Subtract the current (group) permissions of a file from the executable mode

5 chmod o+w File: Add the current (all other) permissions of the file to the writable mode

6 chmod a-x file: minus the write mode for the current (user), (group), (all other) permissions of the file

7 chmod 777 File: Sets the current (user users), (group), (all other) permissions of the file to a readable writable executable mode

8) chmod-r 777 file: Sets the permissions of all files and folders in the file directory to the current (user users), (group), (all others) in a recursive manner, to the readable writable executable mode

Note:

If the Execute Modify permission appears Operation not permitted please add sudo chmod-r 777 file before the command

Thank you for reading, I hope to help you, thank you for your support for this site!

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.