Linux permission management

Source: Internet
Author: User

Address: http://www.cnblogs.com/feisky/archive/2009/11/15/1603295.html

/Etc/passwdRecord account information, but do not save Password

/Etc/shadowSave User Password

/Etc/groupSave allGroupName

 

Ls-lView Permissions: R w x S

Corresponding number:4 read, 2 Write, 1 run.

Special permissions: 4 is SUID, 2 is SGID, and 1 is sticky bit

SPermission: run with the owner permission

Directory sticking bitT:777But you can only delete your own files.

 

 Ls-DL/tmp/

Drwxrwxrwt 518 Root 499712/tmp/

[Permission][LINK] [owner] [group] [Size] [Modification date][Name]

 

Note: For FilesRwxIt refers to the ability to read and write files or execute files.,This does not include deleting the file;

For directories,RYou can read the file list,XYou can enter the directory (RXThe permission must exist at the same time .)WYou can add or delete files or subdirectories in this directory.

 

 

Change permissions:Chmod chown chgrp

Chmod-A | u | G | O + |-| = r | w | x

A = All, u = user, G = group, O = Other

+ Add permissions

-Delete Permissions

 

Special permissions:

Chattr: chattr + I file1Indicates files that cannot be modified,RootIt cannot be modified.

Chattr +Indicates that it cannot be deleted or modified, but can only be added (such as log files)

ViewIAttribute:Lsattr

 

SudoPermission:

Configuration File/Etc/sudoersOnly availableMongodoEdit (requiredRoot)

 

Access Control List:

Setfacl

Getfacl

 

End

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.