LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   maintaining .group file onership (https://www.linuxquestions.org/questions/linux-newbie-8/maintaining-group-file-onership-415790/)

pacific 02-15-2006 01:25 PM

maintaining .group file onership
 
My question has to do with maintaining group ownership of files.

The Set-up:

I have created a group called "budget".

I added two users to the budget group:
user1
user2

I created a directory called "2006budget"

drwxrwxr-- 11 root budget 4096 Feb 15 10:00 2006budget

I added the file:

-rwxrwxr-- 1 root budget 38520 Feb 15 10:00 2006trvl

When user1 modifies the file the attributes change to:

-rwxrwxr-- 1 user1 user1 39000 Feb 15 11:00 2006trvl

When user2 tries to modify the file it is now read only to user2. Is there a way to maintain the .group attribute when a user modifies a file? Also, for example, if user1 creates a new file in this directory is there a way to have that file written with the .group ownership so that user2 can modify it.

I know how to chown .budget user1, but I don't want to have to do that every time a file is created or modified by as group member.

I hope I did not make a mess of this question and I appreciate your patience.

Thanks...

BobNutfield 02-15-2006 01:54 PM

This is not an expert answer to your question, but I have been able to solve permission issues from the GUI as root. I simply open the directory in question (the 2006budget directory) in Konqueror, click on properties, and alter the permissions for the group.

You must be root to do this. This has worked for me for similar problems having to do with user access to group files. The owner of the file does not change, but other users can write to it.

This is somewhat of a novice answer, but I hope it helps.

Bob

pacific 02-15-2006 02:19 PM

Thanks for the reply. I found that (as root) set directory to:
chmod g+s 2006budget
maintains the group ownership to .2006budget for new files and modified files. I created a group 2006budget and added users.

Thanks again....

ps. I found a really informative web site article for this type of question and many others, but i'm not sure if I am supposed to put links up.

BobNutfield 02-15-2006 02:28 PM

A number of posts include links. If they are helpful and informative, I know of no rule against them. I do know that the moderators do a good job of keeping this site organized and very useful for new users and they will be quick to inform anyone of any inappriate posts.

Bob


All times are GMT -5. The time now is 11:21 AM.