LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Inheritable Permissions (https://www.linuxquestions.org/questions/linux-newbie-8/inheritable-permissions-339798/)

steve007 07-04-2005 04:07 AM

Inheritable 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

hw-tph 07-04-2005 04:56 AM

You might want to look into the LinuxQuestions Quick and Dirty Guide to Linux File Permissions.

Quick answer: You will want to use the SETGID bit, which makes all files created under a specific directory belong to a specific group. So you add a group called "shared" and chown /usr/local/stuff/shared to root:shared and chmod the directory to g+rw. Then you set the GID bit: chmod g+s /usr/local/stuff/shared. Now all files created in this directory will belong to $USER:shared.

You may also want to consider using the sticky bit.

Håkan

steve007 07-04-2005 05:11 AM

using the setgid doesnt seem to work. i chmod the directory to have setgid enabled on the main directory (test folder) but when a user creates a new folder in this directory its owner is test1 (the user) and the group is test, but the write option has gone from it in the group permissions. so it just lets the users of the group test read and execute but not write
i have done this both through the GUI approach and command approach (not that is should make any difference to it working should it?)

thanks,

Steve.

PS.
additional informaton, the user test1 and test2 are logging into this machine on a Samba domain. they are using windows 2000 and ther user test1 created a folder in "test folder" using the windows interface. dont know if this information was relevant but i'll post it anyways.


All times are GMT -5. The time now is 09:35 AM.