2016/8/18 Linux Common commands: Rights Management commands

Source: Internet
Author: User

1. Change file or directory permissions: chmod

chmod [{Ugoa} {+-=} {rwx}] [file directory] [mode=42] [file or directory]

Digital representation of permissions: R---4 w---2 x---1 rwxrw-r--:764

chmod u+x Test.list

Chmod-r 421 TestDir

-R Recursive modification: all users under directory and directory have permissions

2. Change the file or directory owner: chown

chown [user] [file or directory]: chown Bob fengjie.list

3. Change the owning group of the file or directory: CHGRP

Charp [user Group] [file or directory]: chgrp Bob fengjie.list

4. Display, set default permissions for files: umask

Umask [-S]

-S to display the new file default permissions in rwx form

Umask 023 so that the permissions for new files are 777-023 = 754


2016/8/18 Linux Common commands: Rights Management commands

Related Article

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.