Linux Fundamentals and Applications tutorial 003 (Simple basics of Rights management commands)

Source: Internet
Author: User
Tags chmod

1.chmod (Rights Management) [[email protected] tem]# chmod-r 777/tem/a/b recursive change of permissions;

Permission number method owner, root to change permissions;

R----4

W---2

X---1

2.chown change the file or owner;

[email protected] tem]# Touch Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-r--r--. 1 root root 0 April 11:42 Fengjie
[Email protected] tem]# Useradd Shenchao
[Email protected] tem]#
[Email protected] tem]# chown Shenchao Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-r--r--. 1 shenchao Root 0 April 11:42 Fengjie

3.CHGRP (change the group to which the file belongs)

[Email protected] tem]# Groupadd Lampbrother
[Email protected] tem]# chgrp lampbrother Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-r--r--. 1 Shenchao lampbrother 0 April 11:42 Fengjie
[Email protected] tem]#

[Email protected] tem]# chmod g+w Fengjie
[Email protected] tem]# ls-l Fengjie
-rw-rw-r--. 1 Shenchao lampbrother 0 April 11:42 Fengjie

4.umask-s display, set the default permissions of the file;

[Email protected] tem]# mkdir test1
[Email protected] tem]# ls-l test1
Total dosage 0
[Email protected] tem]# ls-ld test1
DRWXR-XR--. 2 root root 6 April 11:58 test1
[[Email protected] tem]# (change to a unified desired permission)

Linux Fundamentals and Applications tutorial 003 (Simple basics of Rights management commands)

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.