Linux Essentials-10, Rights Management Chown CHGRP chmod umask

Source: Internet
Author: User

Linux User and permissions detailed


Rights Management

Chown chgrp chmod umask


################################################


Chown: Modify Owner

-R: Modify the directory and its internal genera group

--reference

Chown username:grpname file simultaneously modifies the genus Master Group

[Email protected] ~]# chown jameszhan:root/tmp/tmp.txt

################################################

Chgrp: Modifying the genus Group

-R: Recursive modification of the genus Group

--reference


################################################


chmod: Modify permissions for other groups belonging to the main group


Three types of users

U

G

O

Three types of permissions

R

W

X


chmod +rwx


RWX: Read and write execution

---: No permissions


[Email protected] t]# ll/tmp/

Total Dosage 40

-rw-r--r--. 1 root root 0 November 19:28 1btest2


Copy Permissions

Chown--reference=/tmp/abc/tmp/test



[Email protected] ~]# ll/tmp/

Total Dosage 40

-rw-r--r--. 1 jameszhan Root 0 November 19:28 1btest2

-rw-r--r--. 1 root root 0 November 19:32 23btest2


[Email protected] ~]# chown--reference=/tmp/1btest2/tmp/23btest2

[Email protected] ~]# ll/tmp/

Total Dosage 40

-rw-r--r--. 1 jameszhan Root 0 November 19:28 1btest2

-rw-r--r--. 1 jameszhan Root 0 November 19:32 23btest2


################################################


Umask

Directory default Permissions 666

File default Permissions 777


Admin default umask=002

General user Default umask=022


[Email protected] ~]# umask

0022


################################################


This article is from the "James Zhan Linux Advanced ops" blog, so be sure to keep this source http://jameszhan.blog.51cto.com/10980469/1875162

Linux Fundamentals-10, Rights Management Chown CHGRP chmod umask

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.