LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-04-2005, 05:07 AM   #1
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Rep: Reputation: 15
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
 
Old 07-04-2005, 05:56 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
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

Last edited by hw-tph; 07-04-2005 at 05:57 AM.
 
Old 07-04-2005, 06:11 AM   #3
steve007
Member
 
Registered: Jun 2005
Distribution: Fedora Core 3
Posts: 96

Original Poster
Rep: Reputation: 15
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.
 
  


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
file permissions OK, but command permissions? stabu Linux - General 2 10-05-2005 01:00 PM
inheritable permissions steve007 Linux - Security 9 07-13-2005 08:36 AM
inheritable permissions steve007 Linux - Newbie 4 07-05-2005 02:35 PM
permission ... permissions .... permissions alaios Linux - General 1 05-31-2005 05:16 AM
getting a directory's permissions and creating a new one with the same permissions newbie1000101 Programming 1 04-10-2004 01:52 PM


All times are GMT -5. The time now is 06:36 PM.

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