No.24 Basic permissions, special permissions, ALC permissions control in Linux

Source: Internet
Author: User

UNIX Timestamp: The number of seconds to reach the specified time from 1970-01-01 00:00:00.

Permissions for the file:

read:R write:w execute:x

owner:u belongs to group:G others:o all:A

-rwxrw-rw-. 1 root root 1094205 ntfs-3g-2014.2.15-6.el6.x86_64.rpm

Permission Bits number of hard connections Owner Genus Group size Last Modified Time Files and directories

The permission bits are octal digits,R is 4,w is 2, andx is 1.

Change Basic permissions:x does not belong to basic permissions

chmod [Ugoa] [+-=] [rwx] file or directory

chmod Digital files or directories

-R : Recursive Modify permissions recurrence

The directory has executable permissions before it can be accessed using the CD command.

in Linux, General files do not have x permissions, others depend on the umask value.

Chown Master file or directory

Chown : A group of files or directories

Chown: A group file or directory equivalent to the CHGRP command, specifically modifying the genus Group.

-R : Recursive Modify Permissions

Special permissions:

--Above the U,g, ando groupings superimposed on the permission bit

-- used to pass the program execution identity, restrict directory write rights.

Category

Character representation

Digital representation

Overlay position

Set UID

S

4

X -bit of User

Set GID

S

2

X -Bits of Group

Sticky

T

1

X -Bits of Other

SUID Permissions:

occupies the X-bit of the owner's permission bit .

displayed as s or s, depending on whether the owner has x permissions.

Meaningful only for executable.

when another user executes the band SUID a program that is marked with the user's identity and appropriate permissions.

SGID Permissions :

occupies the X-position of the genus Group .

displays as s or s, depending on whether the group has x permissions.

Valid for an executable program or directory.

when another user executes the band SGID a program that is marked with the identity of the program group and the appropriate permissions.

in one with under the SGID permissions directory, the newly created document automatically inherits the group identity of this directory.

When not set When you SGID permissions, the owning group for the new document is who created who owns it.

Sticky Bit:

sticky bits, which occupy the X-bits of other people .

is displayed as t or T, depending on whether the other person has permissions.

Applies to directories to restrict user abuse of write rights.

In a directory where sticky bits are set, the timed user has write permissions and cannot delete or rename other users ' documents.

The role of ACL permissions:

EXT Series File system support , you can set separate rwx permissions for individual users /groups .

Sets the default RWX permission for the new child profile for the directory .

Getfacl directory or file

Specify a file or directory path as a parameter

Most documents will not be set by default for any additional ACL Policy

Setfacl Option u: user name : permission file or directory

Setfacl option g: group name : permission file or directory

Parameters:

-M : Define an ACL policy

-x: Clears the specified ACL policy

-B: Clears all ACL policies that have been set

-R : Recursive set ACL policy

-D : Set default permissions for the directory (subdocument auto-inherit)


No.24 Basic permissions, special permissions, ALC permissions control in Linux

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.