Linux User and Permissions Basics 3 Linux Extended permissions

Source: Internet
Author: User
Tags chmod

1 Default Permissions

1 Each terminal has a umask permission to determine the default permissions for new files and new folders

2 Umask uses digital permissions to represent, say, 022

The default permissions for the 3 directory are 777-umask, and the default permissions for the files are 666-umask

4 The average user's umask is the 0002,root user's umask is 022

5 The permissions for the new file are 666-0002 = 664 => rw-rw-r--

Like I create a new file under my home directory named Linuxcast.net.

The permissions for the new folder (directory) are 777-0002 = 775 => rwxrwxr-x

Like my home directory to create a new folder Linux

6 use Umask to set the Umask value of the terminal

2 Special Permissions

1 There are three special privileges in addition to normal permissions

2 Impact of permissions on a file on the directory

SUID executes as a file-owning user without

Rather than the user who executed the file

Sgid Run as a file-owning group the owning group that created the new file in the directory is the same as the directory

Sticky users who do not have write access to the directory can delete the files they own

However, you cannot delete files owned by other users

3 Setting Special Permissions

1 setting Suid

chmod u+s filename

2 Setting Sgid

chmod g+s filename

3 Setting Sticky

chmod o+t filename

4 As with normal permissions special permissions can also be represented by numbers

SUID = 4

Grid = 2

Sticky = 1

See more highlights of this column: http://www.bianceng.cn/OS/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.