Change folder permissions in Ubuntu

Source: Internet
Author: User
Many operations on Ubuntu are performed on the terminal. Files managed by the sudo command are owned by the root user, which cannot be changed by the general user. On the graphic interface, you can use the permission options folder in the attribute to perform operations. However, once the file property shows that the current user has no read/write permissions, the permissions cannot be modified on the graphic interface. Common methods are as follows: sudochmod600 & times; (only the owner has read and write permissions) sudochmod644 & ti

Many operations on Ubuntu are performed on the terminal. Files managed by the sudo command are owned by the root user, which cannot be changed by the general user. On the graphic interface, you can use the permission options folder in the attribute to perform operations. However, once the file property shows that the current user has no read/write permissions, the permissions cannot be modified on the graphic interface.

The common method is as follows:

Sudo chmod 600 ××× (only the owner has read and write permissions)
Sudo chmod 644 ××× (the owner has the read and write permissions, and the group user only has the read permission)
Sudo chmod 700 ××× (only the owner has the permission to read, write, and execute the chmod)
Sudo chmod 666 ××× (everyone has read and write permissions)
Sudo chmod 777 ××× (everyone has the permission to read, write, and execute the chmod)

××× Indicates the file name (or folder name, but-ld must be added after chmod ).

To explain, the entire command is actually in the form
Sudo chmod-(representing the type) ××× (owner) ××× (group user) ××× (other Users)

Each digit of the three-digit number represents a user-type permission setting. The value ranges from 0 ~ 7, that is, the binary [000] ~ [111].

Each digit of the three binary numbers represents the read, write, and execution permissions respectively.

For example, "000" indicates that no three permissions are available, and "100" indicates read-only. In this way, we have the following correspondence:
0 [000] No Permissions
4 [1, 100] Read-Only permission
6 [110] Read and Write Permissions
7 [111] Read and Write execution Permissions

Now let's take a look at the common usage above. Try to modify the permission on your own.

Finally, the command for querying the file (or folder) Permission is attached.
Ls-l file name (Change-l to-ld in the folder ).

For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2

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.