Rights Management in Linux file attribute permissions

Source: Internet
Author: User

chattr [+-=][Options] File or directory name
+ Add Permissions
-Delete Permissions
= equals a permission
Options:
I file settings I property, do not allow the deletion of files, renaming, add, modify data, the equivalent of the entire file locked up
Directory Settings I property, can only modify the files in the directory data, cannot create, delete files
A file set a property, can only add data in the file, cannot delete and modify (only use echo xxx >> file)
Directory setting a property, only the contents of the file can be created and modified in the directory, but the file cannot be deleted
Attention:
1. The restriction on this command is as effective as root
2. It is not intended to be a limitation, but to prevent mis-operation

Lsattr option file name
A show all files and directories
D If the target is a directory, listing only the properties of the directory itself, not the file

Rights Management in Linux file attribute permissions

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.