LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 08: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, 08:42 AM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,191

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 08:43 AM.
 
Old 04-03-2008, 08: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, 10: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, 09:09 PM   #5
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,191

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, 06: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


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


All times are GMT -5. The time now is 06:23 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