A file created by a user (Andy) under Linux allows a specific user (Alice) to modify

Source: Internet
Author: User



Add User group Ateam


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/76/0A/wKioL1ZJWsigzccWAAAvztm2lYg934.png "title=" Rhce7-classroom-2015-11-09-22-46-08.png "alt=" Wkiol1zjwsigzccwaaavztm2lyg934.png "/>


Create a directory under root user/home/ateam-text


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/76/0C/wKiom1ZJWnexTCV8AABDtuK0xvs882.png "title=" Rhce7-classroom-2015-11-09-22-47-47.png "style=" Float:none; "alt=" Wkiom1zjwnextcv8aabdtuk0xvs882.png "/>


Add Andy Alice Tom user


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/76/0A/wKioL1ZJWsfjpv9YAADhxFBfcIg021.png "title=" Rhce7-classroom-2015-11-09-22-50-21.png "style=" Float:none; "alt=" Wkiol1zjwsfjpv9yaadhxfbfcig021.png "/>


Add Andy Alice users to the Ateam group as a supplemental group


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/76/3C/wKioL1ZNpfjwnCktAACCUA1irBQ114.png "title=" Rhce7-classroom-2015-11-19-18-01-26.png "alt=" Wkiol1znpfjwncktaaccua1irbq114.png "/>



Change the owning group of the directory/home/ateam-text to Ateam


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/76/0A/wKioL1ZJW6Sh4NEvAABIVpiHkdI417.png "title=" Rhce7-classroom-2015-11-09-22-52-48.png "alt=" Wkiol1zjw6sh4nevaabivpihkdi417.png "style=" float:none; "/>


Change group permissions for directory/home/ateam-text


650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/76/3E/wKiom1ZNps3hmxBzAABSTATGiI4930.png "title=" Rhce7-classroom-2015-11-19-18-06-11.png "alt=" Wkiom1znps3hmxbzaabstatgii4930.png "/>


At this point Andy Alice user has read and write permission under directory/home/ateam-text and Tom user does not have read and write permission


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/76/3E/wKiom1ZNq_Wz9vmhAABU3MQ-35g958.png "style=" float: none; "title=" Rhce7-classroom-2015-11-19-18-58-13.png "alt=" Wkiom1znq_wz9vmhaabu3mq-35g958.png "/>650) this.width=650, "src=" Http://s3.51cto.com/wyfs02/M02/76/3E/wKiom1ZNq_Wz9AYBAABScEi7TPY310.png "title=" Rhce7-classroom-2015-11-19-18-58-06.png "style=" Float:none; "alt=" Wkiom1znq_wz9aybaabscei7tpy310.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/76/3D/wKioL1ZNrEriq-7HAAA_rCjG8N0975.png "style=" float: none; "title=" Rhce7-classroom-2015-11-19-18-58-23.png "alt=" Wkiol1znreriq-7haaa_rcjg8n0975.png "/>

But for Andy Alice, each subdirectory created under directory/home/ateam-text does not have read and write permissions

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/76/3D/wKioL1ZNrZuBIaPWAAA-xvtpB3w971.png "title=" Rhce7-classroom-2015-11-19-19-05-50.png "alt=" Wkiol1znrzubiapwaaa-xvtpb3w971.png "/>

Because the owner of the subdirectory created and all groups have no read and write permissions for the user


Special permissions are needed to "inherit" the newly created file permissions


Make the newly created file under directory/home/ateam-text the same as the group for that directory (inherit the group permissions of directory/home/ateam-text)


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/76/3E/wKiom1ZNrxKiYGZpAABJGhKTuGY133.png "title=" Rhce7-classroom-2015-11-19-19-13-18.png "alt=" Wkiom1znrxkiygzpaabjghktugy133.png "/>


At this point the newly created subdirectory belongs to the group Ateam


650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/76/3D/wKioL1ZNsFbQCEGNAABTF4qe_ik753.png "title=" Rhce7-classroom-2015-11-19-19-16-55.png "alt=" Wkiol1znsfbqcegnaabtf4qe_ik753.png "/>

Now Alice user can modify all the files that Andy creates later


650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/76/3D/wKioL1ZNsVSxVVhuAABbZA7NWIY936.png "title=" Rhce7-classroom-2015-11-19-19-21-36.png "alt=" Wkiol1znsvsxvvhuaabbza7nwiy936.png "/>



This article is from the Linux Learning Notes blog, so be sure to keep this source http://10516823.blog.51cto.com/10506823/1715203

A file created by a user (Andy) under Linux allows a specific user (Alice) to modify

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.