LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 04-03-2008, 07:34 AM   #1
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Rep: Reputation: 15
Smile Files and group permissions where am i going wrong in life!


dear sir/madam

i dont know how to begin but here i try;
we have a pasty file server which users acess from window machines using samba. All users have access to main folder called MasterFolder.
The read/write/exec access to folders withing this MasterFolder is controlled by groups, so a user can only write to a folder if they are member of that group.
We have a folder called folderA and its group owner is GroupA. When 2 users(user a and user b)are members of GroupA this gives them write access to that folder. Now when user a creates a folder inside folderA the write permissions on that newly created sub folder becomes the user A's group name. Hence the other member of folderA, users b, cannot write to that newly created sub folder created by users a.
my question is is there a way where either users(both members of GroupA, which is the group owner of folderA) can write subfolders and makes changes to one anothers sub folders?
any help will be appreciate
sorry if not clear enough but im getting there...
 
Old 04-03-2008, 07:42 AM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
You need the set group ID bit on the parent directory.

# chmod g+s MasterFolder

If you had set that up initially, it would work. Now you will have to go down through the contents and fix things. You can use chgrp to reset the group on files and subdirectories, and you can use the `chmod g+s` to set the set group ID bit on subdirectories. What it does is causes anything created within to get the group of the MasterFolder as well as its own sgid bit if it is a directory.

Last edited by choogendyk; 04-03-2008 at 07:43 AM.
 
Old 04-03-2008, 07:44 AM   #3
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
Have a look at the SAMBA documentation. What you want to set is the 'create mask' and 'directory mask' for the relevant shares.
 
Old 04-03-2008, 09:59 AM   #4
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
hi guys
thanks very much for prompt reply...ichoogendyk i tried setting the group id g+ws MasterFolder and it worked fine... really appreciate it...thnx
 
Old 04-03-2008, 08:09 PM   #5
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
beadyallen has also given a good point (gee, didn't I just say that in another thread?) that I neglected. In your smb.conf file, you should have the directory mask set to 2770 or 2775. The leading 2 is the set group ID bit. It's actually the reverse of what a umask would be. It is the bits you want to force on as opposed to the bits you want to mask out. It will tell you in the documentation built into the smb.conf file.
 
Old 04-04-2008, 05:26 AM   #6
fedora_user
Member
 
Registered: Jan 2006
Posts: 112

Original Poster
Rep: Reputation: 15
dear choogendyk and beadyallen. thnx for this. to be honest im not very familiar with samba, or linux for that matter. i wasnt sure if beadyallen's post applied to me as the way my smb.conf is setup is that the MasterFolder folder, which i have been talikng about in this thread is actually inside another folder called CCLS and it is this folder that is mounted in in the smb.conf file. this folder contains other data apart from MasterFolder where group members are only allow to view and not write in. the main concern was the MasterFolder which SOME users can write inside and SOME only view.
The post by beadyallen suggests apply the persmission to the main ccls folder, which will then give rights to WRITE to anything inside the CCLS folder. not sure if im making sence....
 
  


Reply



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
Help with group permissions? paddyjoy Linux - Newbie 5 11-13-2006 03:40 AM
Group Permissions and Ownership of files and folders bugeyemonster Linux - General 1 04-19-2006 01:52 AM
Wrong group with custom udev rule enragedchip Linux - Hardware 1 12-11-2005 02:46 PM
group permissions towel401 Linux - Newbie 5 12-06-2005 05:19 AM
permissions for group files/directories transferred from Netware mweil Linux - Newbie 1 07-01-2004 10:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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