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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.