Ubuntu modify file or directory permissions

Source: Internet
Author: User
1. query file (or directory) permissions
Querying file permissions, using the command: Ls-l file name
Query folder permissions, using the command: LS-LD directory name


For example:



The first character specifies the file type (if the first character is a horizontal line, it is a non-directory file; if it is D, it is a directory,
The second paragraph is the property of the owner of the file,
The third paragraph is the attribute of the group to which the file belongs.
The fourth paragraph is a property for other users.


2. Modify the file (or directory) permissions
Command form: chmod-(representative type) XXX file (or directory) name

For example:



Each of the three-digit digits represents a user-type permission setting. The value is 0~7, which is the binary [000]~[111]. Each of the three-bit binary digits represents the read, write,

Row permissions.

3. Modify a user group that changes a file or directory
Command form: CHGRP [options] group filename

For example:

Parameter:-R means to recursively change the genus of the specified directory and all subdirectories and files under it.

4. Modify the user or group to which a file or directory belongs
Command form: chown [options] User or group file

For example:



Ubuntu modify file or directory 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.