Ubuntu's chmod and Chown

Source: Internet
Author: User

1.chown Change the owner and group permissions for a file or directory

Format

chown [OPTION] ... [OWNER] [: [GROUP]] FILE ...

Parameters:

-R

Recursively manipulate all directories and files in the current directory;

-H

Change the ownership of the symbolic connection that is encountered, or if you do not specify this option, change the ownership of the file or directory to which the symbolic connection points, not the symbolic connection itself;

eg

Chown-hr ROOT:STAFF/AA

Change the owner of the/AA to root, group as staff

2.chmod

chmod [-CFVR] [--help] [--version] Mode file ...

U means the owner, G represents the group, and O denotes the other person, a means that all three are.
+ indicates an increase in permissions,-represents a cancellation permission, = Represents a unique set of permissions.
R is readable, w means writable, x is executable, x means only if the file is a subdirectory or the file has been set as executable

R=4,w=2,x=1
-C: If the file permissions have changed, the change action will be displayed
-F: Do not display an error message if the file permissions cannot be changed
-V: Show details of permission changes
-r: The same permissions change for all files in the current directory and subdirectories (that is, they are changed in a recursive manner)
Help: Show Auxiliary instructions
–version: Display version

eg

Chmod-r 777 AA

Ubuntu's chmod and Chown

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.