Linux Rights Management commands chmod, files, and directories for the meaning of permissions

Source: Internet
Author: User

Chmod/bin/chmod

chmod [{ugoa}{+-=}{rwx}] [file or directory]
chmod [mode=421] [file or directory]
-R Recursive modification

Only Root and owner can modify permissions for a file or directory

U owner G-owned group O other person a owner

chmod u+x file name
chmod u+x,o-r file name
chmod g=rwx file name

R--4, W--2, X--1

chmod 760 file name

Root User:

Mkdir-p/temp/test.dir
Touch/temp/test.file
chmod 777/temp
Useradd MEINV
passwd MEINV

MEINV Users:
rm-rf/temp/*
The deletion was successful.

Filename Directory
R Read permissions You can view the contents of the file (Cat,more,head ...) Can list content in a directory (LS)
W Write permissions Can modify the contents of the file (VIM) You can create and delete files in the directory (MKDIR,TOUCH,RM)
X Execute permissions Can execute file Access to directory (CD)





Linux Rights Management commands chmod, files, and directories for the meaning of permissions

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.