LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-30-2006, 08:42 AM   #1
yull
Member
 
Registered: Dec 2004
Location: Belgium
Distribution: debian
Posts: 48

Rep: Reputation: 15
chgrp after creating a file


Hi all,

I'd like to do a chgrp on a file each time I create a new one in a home dir.

for instance, if user user_a creates a file un /home/user_b (the 2 users belong to the same group 'users' and the group has rwx access on /home/user_b), the file created belongs to user_a:user_a.

I want them to belong to the group to wich belongs user_a and user_b.
I mean: user_a:users

How can I do this automatically?

Am I clear? I'm no sure..:-/

any ideas?

thanks
 
Old 01-30-2006, 09:36 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Make the folder owned by the group 'users' and set the setgid bit on the folder (chmod g+s foldername) and it should maintain this, IIRC.
 
Old 02-06-2006, 03:28 PM   #3
yull
Member
 
Registered: Dec 2004
Location: Belgium
Distribution: debian
Posts: 48

Original Poster
Rep: Reputation: 15
works fine

thanks
 
  


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
chgrp: operation not permitted even though I own the file! the theorist Linux - Newbie 16 05-28-2010 11:02 PM
when creating a *.iso file, how to make the file size smaller? minm Linux - Newbie 8 12-26-2004 09:58 PM
Chgrp Problem LinuxRam Linux - Newbie 7 08-30-2004 11:55 PM
Why can't users chgrp ? Rotwang Linux - General 11 03-22-2004 09:35 PM
file perm, chgrp, chmod, and umask Martini Linux - Newbie 2 08-06-2002 08:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:48 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
Open Source Consulting | Domain Registration