LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-15-2009, 04:10 AM   #1
goncalopp
Member
 
Registered: Jun 2008
Posts: 47

Rep: Reputation: Disabled
enforcing unix permissions on directories


Hey guys, I'm a bit stuck on this one..

Is there a way to force a directory's group permissions to its childs?

i.e.: directory1 is owned by user1, and has group group1, with 770 permissions. Is there a way to ensure that user2 (which also belongs to group1) cannot create files under that directory set to any group other than group1?

Is this possible with the unix permission model?
Or maybe with ACLs?
 
Old 12-15-2009, 06:36 PM   #2
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
chmod +s dirname

sets the sgid bit on the dir; all files created in there will be (group) owned by the dir's group.
See also chgrp.
 
1 members found this post helpful.
Old 12-16-2009, 08:52 AM   #3
goncalopp
Member
 
Registered: Jun 2008
Posts: 47

Original Poster
Rep: Reputation: Disabled
That's exactly what I was looking for. 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
[SOLVED] ownerships/permissions in sub-directories? fadinader Linux - Newbie 31 08-24-2009 12:04 PM
Permissions and directories arubin Slackware 6 09-21-2007 03:56 AM
Hide directories on Unix anhtt Linux - General 5 08-06-2007 02:41 PM
LXer: Speaking UNIX, Part 4: Setting and managing permissions on UNIX LXer Syndicated Linux News 0 10-21-2006 01:54 AM
permissions home directories powadha Debian 6 06-11-2004 11:45 AM


All times are GMT -5. The time now is 12:38 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration