Ladies and gentlemen gave advice to the younger brother, chmod, and confused yesterday.

Source: Internet
Author: User
Dear brother and sister, I am confused about the chmod of my younger brother. Yesterday I went to Linux general technology-Linux technology and application information. For more information, see the following. I am a little confused about the use of chmod: This is my blog from a person (http://hi.baidu.com/angivo/blog/... 7f68320dd7da10.html) Don't know, right? I know that my understanding is a bit wrong:
Chmod is a command for setting file permissions in Linux. The following numbers indicate permissions of different users or user groups.

Generally, there are three numbers:
The first number indicates the permission of the file owner.
The second number indicates the permissions of other users in the same user group as the file owner.
The third digit indicates the permissions of other user groups.

There are three types of permissions: Read (r = 4), write (w = 2), and execute (x = 1 ). In combination, there are also readable executable (rx = 5 = 4 + 1) and readable writable (rw = 6 = 4 + 2), readable and writable (rwx = 7 = 4 + 2 + 1 ).

I have created three users (idc mu c) in 64-bit fedora11. In the home folder, there are three users (idc, mu, and c), and three folders (/etc/group, I can see three user groups: idc, c, mu. Then I enter the root user and designate three users, idc, c, and mu, as idc, c, and mu, the administrators of the three user groups then enter the idc user and execute the following command:
[Idc @ localhost home] $ gpasswd-a mu idc
Adding User "mu" to "idc" group
[Idc @ localhost home] $ ls
C idc linuxidc mu muchuanqi
[Idc @ localhost home] $ chmod 750 idc
[Idc @ localhost home] $ su mu
Password:
[Mu @ localhost home] $ ls
C idc linuxidc mu muchuanqi
[Mu @ localhost home] $ cd idc
[Idc @ localhost ~] $ Su mu
Password:
[Mu @ localhost idc] $ cd ..
[Mu @ localhost home] $ ls
C idc linuxidc mu muchuanqi
[Mu @ localhost home] $ chmod 750 mu
[Mu @ localhost home] $ su idc
Password:
[Idc @ localhost home] $ cd mu
Bash: cd: mu: insufficient Permissions
[Idc @ localhost home] $ id mu
Uid = 501 (mu) gid = 501 (mu) groups = 501 (mu), 500 (idc), 508 (muchuanqi)
I would like to ask if I have already added mu to the idc group. mu is already a member of the idc, And I can access this folder using chmod 750 idc and mu, however, why can't the idc access the mu file with chmod 750 mu under the mu user, while mu is a member of the idc user ...... High finger points
How can I set this folder permission?
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.