LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-11-2005, 03:14 PM   #1
twallstr
LQ Newbie
 
Registered: Aug 2004
Posts: 25

Rep: Reputation: 15
changing group


I have a question about changing the group owner of a folder and the files in it.
I have a user, thomas, and a folder named folder1. This folder with the files in it is initially owned by user and group thomas. I want to change the group to "special" so I use the chgrp command like;
chgrp -R special folder1.
Here everything looks OK as both folder and files in it all have a new group owner, "special".
What confuses me is if user thomas now creates another file in "folder1" it does not get the group owner special but rather thomas.
Can anybody please exlplain why this is so and what I can do so that all new files saved in folder1 inherite the group special.

Thank you!

twallstr.
 
Old 09-11-2005, 03:44 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
That's default behaviour. To get the perms on the newly
created files to be the groups by default you'll have to make
the directory folder1 SETGID.

chmod -R g+s folder1


Cheers,
Tink
 
Old 09-11-2005, 04:00 PM   #3
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 122Reputation: 122
While tinkster probably has a far better knowledge than I do, I would think using -R on that chmod command might have potential problems on files. I would just do chmod g+s for each directory. But maybe I'm off base here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing group in Konqueror? miscreant Linux - Software 1 07-08-2005 06:42 PM
Changing user's group? orange400 Linux - General 2 06-18-2004 05:30 AM
Changing user group atze Linux - Newbie 12 06-08-2004 09:27 AM
Changing User Group Didn't Work ryancoolest Linux - Newbie 1 01-28-2004 08:55 PM
changing the group anwar_lpk Linux - Networking 2 05-08-2003 11:10 PM


All times are GMT -5. The time now is 10:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration