Linux commands--Rights management commands

Source: Internet
Author: User

Linux commands--Rights management commands

Rights Management Command: chmod

English Name: chmod

Command English original:change the permissions mode of a file

Command path:/bin/chmod

Execute Permissions: All Users

Syntax: chmod "{ugoa}{+-=}{rwx}" "File or directory"

"mode=421" "File or directory"

-R Recursive modification

Function Description: Change file or directory permissions

Example: Way One:

chmod u+x japanlovestory.list Add an Execute permission to the Japanlovestory.list to the owner

chmod g+w,o-r Japanlovestory.list

chmod g=rwx Japanlovestory.list

Mode two: rwxrwxr--is represented by a number of 774

CHMOD 640 Japanlovestoryl.list The modified permission is rw-r-----

All files in chmod- R 777/tmp/a A directory will be changed to 777

=======================================================================================

English Name: Chown

Command English original meaning:change file ownership

Command path:/bin/chown

Execute Permissions: All Users

Syntax: chown "user" "File or directory"

Function Description: Change the owner of a file or directory

Example: Chown Shenchao Fengjie Change the owner of the file Fengjie to Shenchao

=======================================================================================

English Name: chgrp

Command English original meaning:change file grouP ownership

Command path:/BIN/CHGRP

Execute Permissions: All Users

Syntax: chgrp "user" "File or directory"

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

Example: Chgrp lampbrother fengjie Change file Fengjie belongs to group Lampbrother

Note: Who creates the file, who is the group that owns the file. Each file is created with a group that is the default group where the owner resides.

=======================================================================================

English Name: umask

Command English original: Theuser file-creation mask

Command path: Shell built-in command

Execute Permissions: All Users

Syntax: umask "-S"

-S Displays the new file default permissions in rwx form

Function Description: Displays, sets the default permissions for the file.

Example: $ umask-s

    

Linux commands--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.