linux-Common Commands (2) Rights Management commands

Source: Internet
Author: User

Rights Management Command: chmod

Command name: chmod

Command English original:change the permisssions modE of a file

Command location:/bin/chmod

Execute Permissions: All Users

Function Description: Create a new directory-P recursive creation

Syntax: chmod [{Ugoa} {+-=} {rwx}][file or directory]

[mode=421] [ file or directory ]

-R Recursive modification

Numeric Representation of permissions

R----4

W----2

X----1

rwx rw- r--

7 6 4

Example:

$ chmod g+w testfile

Give the file testfile the group Write permission

$ chmod-r 777 TestDir

Modify directory TestDir and its directory files for all users with full permissions

----------------------------------------------------------------------------------

Rights Management Command : Chown

Command name: CHOWM

Command English original meaning:change file ownership

Command location:/bin/chown

Execute Permissions: All Users

Function Description: Change the owner of a file or directory

Syntax: chown [user] [file or directory]

----------------------------------------------------------------------------------

Rights Management Command : CHGRP

Command name: CHOWM

Command English Original: chAnge file grouP ownership

Command location:/bin/chowm

Execute Permissions: All Users

Function Description: Change the owning group of a file or directory

Syntax: chown [user] [file or directory]

----------------------------------------------------------------------------------

Rights Management Command : umask

Command name: umask

Command English Original: the user file-creation Mask

Command path: Shell built-in commands

Execute Permissions: All Users

Function Description: Display, set default permissions for files

Syntax: umask [-S]

-S A rwx form shows the new file default permissions





linux-Common Commands (2) 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.