Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I have 2 users (A and B) both members of a group called 'newgrp'.
As root, created a directory in "/usr/local/" and named it "temp".
As root, changed the ownership as 'chown -R newgrp /usr/local/temp'
Changed the permissions 'chmod -R gau+rwx /usr/local/temp'.
User A and B are able to read and write in temp directory.
But when user A creates a subdirectory as /usr/local/temp/sub, User B is not able to write in that subdirectory. This is because the permission is not set properly for this new subdirectory. It allows only A to write.
Can anyone tell me how to set the permissions so that both A and B can create new subdirectories and enjoy the privilege of read and write in subdir created by each other.
I think this is same as chmod -R gau+rwx /usr/local/temp
777 = gau+rwx
My problem is that anything created in /usr/local/temp by either A or B is owned by him. Probably I want the ownership to be of the group even when A or B creates a file/directory. Group ownership will ensure that both will be able to r/w.
Last edited by vijay_babu1981; 10-22-2009 at 02:08 AM.
Reason: each 7 is for g, a and u
You're confusing dirs with files. For a dir, its r = read, w = write, x = search; and yes, altering the 'x' to 's' via chmod g+s is indeed what you want.
BTW, you do know that 'newgrp' is a Unix cmd http://linux.die.net/man/1/newgrp ? I would NOT recommend it for a group name, to avoid (even more) confusion.
Thank you all for helping. chmod -R g+s /usr/local/temp works.
It preserves the group ownership whenever any new file or directory is created.
chrism01: you do know that 'newgrp' is a Unix cmd
I did not know that newgrp was a Unix cmd. But all these names I used in the post are imaginary, actual names I am using are different and fortunately I am not using newgrp as a name for a group. Infact I am trying to create a CVS server and the group name is cvsgroup.