LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   inheriting permissions (https://www.linuxquestions.org/questions/linux-security-4/inheriting-permissions-339810/)

steve007 07-04-2005 04:54 AM

inheriting permissions
 
Hello,
I have a problem with permissions and not sure how to resolve it.
this is the scenario:
two users
test1, test2
part of a group called test

a folder called "test folder", root user created the folder and is owner, the group permissions are set to rwx for test group.

test1 creates a folder called "new folder"
test2 has access to it but can not create or modify the contents of it.

is there a way to get the permissions to filter down from the main folder so that if user test1 creates a folder all users in the test group from the main directory group can modify anything below it??

I am using Fedora core 3 distro.

Steve

theYinYeti 07-04-2005 06:23 AM

I have found no way to preserve permissions. However, there's a way to preserve ownership. In short:
- In /etc/profile, make sure the umask is set to at most 007.
- Execute this:
Code:

# cd '/path/to/test folder'
# chgrp -R test .
# find . -type d -exec chmod 2770 {} \;

Yves.

picobyte 07-04-2005 10:39 AM

I'm not entirely sure what you want but:
maybe you want to set the users default permission so that only that user can alter the file. see:
file:/home/roel/documents/linux/Security-HOWTO.html#umask
maybe you want to set the higher directory to sticky:
chmod +t [directory]
from the same file:
Quote:

The "sticky bit" also has a different meaning when applied to directories than when applied to files. If the sticky bit is set on a directory, then a user may only delete files that the he owns or for which he has explicit write permission granted, even when he has write access to the directory. This is designed for directories like /tmp, which are world-writable, but where it may not be desirable to allow any user to delete files at will. The sticky bit is seen as a t in a long directory listing.

Capt_Caveman 07-05-2005 11:09 PM

Please do not post the same thread in more than one forum. Picking the most relevant forum and posting it once there makes it easier for other members to help you and keeps the discussion all in one place.

http://www.linuxquestions.org/rules.php


All times are GMT -5. The time now is 08:59 PM.