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 folder named /projects. If I use a tool like NetBeans it defaults to the user and group I am using, so anything created on this folder goes under that permission. Now I want also another user to be able to touch those files like 'rwx', so I created a group which had those two users, then grant the group to the folder. Problem is everytime I create a file using the other user, I need to change also the group of that file so the other user can touch it. Is there a better way of doing this? Thanks.
What is your umask setting? If it is removing group read/write privileges, then you can change it accordingly. The value of umask is a bitmap like the file permissions bitmap, but 'inverted'. A bit set in the umask prevents applications from allocating the accordant permission when creating files.
-rw-rw-rw- 1 thenbomr groupnbomr 0 Nov 6 13:57 touch0000
-rw-r--r-- 1 thenbomr groupnbomr 0 Nov 6 13:56 touch0022
-rw------- 1 thenbomr groupnbomr 0 Nov 6 13:59 touch0077
Also, you can change the default group for each user. Make all members of a project have the same default group.
Thanks for the replies. Yeah I thought of doing version controls but since I'm the only one using my PC, that would only create copies of the file for each user. I use the main user ( the one I login on X, to run my dev tools ), then I use the other user - oracle, to run db scripts ( which I code in my dev tool ) and other db admin tasks. So I just thought If I'd go for version control for that, then I'd have checkin/checkout for both users.
As for the umask, is it possible to set it on a folder level? I mean all files created under it will have grants base on the umask marked on it?
I think also one way of fixing this is to give the grants also to my login user so it can also do database admin tasks, not sure if that's possible though.