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 created a group called group1, and put users user1 and user2 into group1. I want these two users to be able to work together on files in the same directory-- so I created a directory called /projects/group1-files, chmod'd it to 2775. Now, when either user can create files/subdirectories in the directory, but when they create a new file, it's permission is 755, so user1 can't write to files created by user2 and vice versa. I could set the umask to 002, but that wouldn't be limited to the directory. What is the correct way to do this?
[user1@receiver group1-files]$ touch test
[user1@receiver group1-files]$ ls
[user1@receiver group1-files]$ vi test
[user1@receiver group1-files]$ cat test
Hello can yu see me
[user2@receiver group1-files]$ pwd
[user2@receiver group1-files]$ cat test
Hello can yu see me
Last edited by your_shadow03; 05-13-2009 at 03:29 AM.
Does what abolishtheun expects: it will first make user1 owner (first command) of all the files/dirs and then make user2 owner. It will definitely _not_ make both users owner of these files!! (On a group level it does, but a chgrp -R group1 would have done the same).
Setting 2775 on the dir will give other user the possibility to save files, even though they don't have write permissions, but you do need to force the save (for example :w vs :w! in vi).
druuna, thanks for the clarification, I thought I was going crazy... does it matter that the group directories (the /projects dir) are on a separate partition? I know that you can set umasks for some file systems but not for ext3! I just want to avoid umask 002 in /etc/profile if possible.
I can see most often say, if I try editing /etc/sudoers if logged-in as root, it says "READONLY" and I need to Press ESC and then press I. Edit the file but save it as wq!.
! is used to override which is same case as above.
What I can understand is if we give "chmod 2775" permissions to a directory (owning by group), it means that (7 - user, 7 - group, 5 - other) that the group (here: user1, user2) can have both read/write permissions.
Now The Doubt is Say, a user called jerry who is outside this group
User - Jerry
[jerry@receiver projects]$ cd /Delta/projects/
[jerry@receiver projects]$ cat test
hello I am user1 just edited this line
I am user2 ...Sounds working for setguid
Hi I am jerry outside this group
How can she edit this since she is outside the group.
Last edited by your_shadow03; 05-13-2009 at 07:41 AM.