LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2005, 09:06 PM   #1
grcunningham
Member
 
Registered: Apr 2004
Location: Florida
Distribution: RedHat 9.0/Afterstep
Posts: 103

Rep: Reputation: 15
group permissions based on folder perms


I'm using Samba on SuSe 9.3 as a PDC and for file sharing, works great. Here is my issue:
user jim: member of docs, finance, busmgmt
the rights for all files in these shares are 770, only the owner or those in that particular group should have access to those files
if jim creates a file in the docs share, I want the group set to docs
if jim creates a file in the finance share, I want the group set to finance
etc...
right now it sets the group to the particular users primary group, which is users...this gives everyone in the company access to all new files..real bad!
is there a way that I can have the group set for all new files to the group that owns the directory?
thanks, Gary
 
Old 05-27-2005, 04:50 AM   #2
goestin
Member
 
Registered: Nov 2004
Location: Netherlands (east)
Distribution: debian, suse, novell linux desktop
Posts: 81

Rep: Reputation: 15
maybe you want to work with a SGID bit ? (set group id bit)

lhope this will help you:
Code:
JustinuX:/test#
JustinuX:/test# ls -la
total 12
drwxr-xr-x    3 root     root         4096 May 27 11:08 .
drwxr-xr-x   23 root     root         4096 May 27 11:08 ..
drwxr-xr-x    2 goestin  finance      4096 May 27 11:08 finance
JustinuX:/test# cd finance
JustinuX:/test/finance# su goestin
goestin@JustinuX:/test/finance$ touch bla
goestin@JustinuX:/test/finance$ ls -la
total 8
drwxr-xr-x    2 goestin  finance      4096 May 27 11:39 .
drwxr-xr-x    3 root     root         4096 May 27 11:08 ..
-rw-r--r--    1 goestin  goestin         0 May 27 11:39 bla
goestin@JustinuX:/test/finance$ exit
JustinuX:/test/finance# cd ..
JustinuX:/test# chmod 2775 finance/
JustinuX:/test# cd finance/
JustinuX:/test/finance# su goestin
goestin@JustinuX:/test/finance$ touch bla2
goestin@JustinuX:/test/finance$ ls -la
total 8
drwxrwsr-x    2 goestin  finance      4096 May 27 11:41 .
drwxr-xr-x    3 root     root         4096 May 27 11:08 ..
-rw-r--r--    1 goestin  goestin         0 May 27 11:39 bla
-rw-r--r--    1 goestin  finance         0 May 27 11:41 bla2
goestin@JustinuX:/test/finance$ su jim
Password:
jim@JustinuX:/test/finance$ touch bla3
jim@JustinuX:/test/finance$ ls -la
total 8
drwxrwsr-x    2 goestin  finance      4096 May 27 11:42 .
drwxr-xr-x    3 root     root         4096 May 27 11:08 ..
-rw-r--r--    1 goestin  goestin         0 May 27 11:39 bla
-rw-r--r--    1 goestin  finance         0 May 27 11:41 bla2
-rw-r--r--    1 jim      finance         0 May 27 11:42 bla3
i hope i've helped you,
-cheers-
 
  


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
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 05:23 PM
folder owner/group weird curos Slackware - Installation 1 07-18-2005 07:13 AM
samba : access denied for some user in same NT group on a folder mtrento Linux - Networking 0 06-27-2005 10:01 AM
LDAP based group problems looseCannon Solaris / OpenSolaris 3 12-02-2004 03:42 PM
sendmail - group-based mail-handling nuxv Linux - Software 0 04-19-2004 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:19 AM.

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