LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-29-2011, 01:45 PM   #1
jillges
LQ Newbie
 
Registered: Aug 2003
Location: Sanford, Florida
Distribution: OpenSuse
Posts: 7

Rep: Reputation: 0
Enforce user and group ownership in subdirectories of a Samba share


I have a Samba share, AcctUsers, setup up for our Accounting Users. Under the share, each user has their own directory. I have given some users access to each others directories so they can access each others files. When a user creates a new file in another users directory, the file is owned by the creating user instead of the directory owner and the directory owner cannot access the file. Ex. Users2 creates a file in User1's directory, the file owner is User2 and User1 cannot access the file. I would like new files to be owned by the directory owner, no matter who has created the files. I used SETFACL to set access permissions. I have set the SUID on the directories, set CREATE MASK, DIRECTORY MASK, FORCE CREATE MODE, FORCE DIRECTORY MODE, FORCE SECURITY MODE, FORCE DIRECTORY SECURITY MODE and nothing enforces file ownership. I have tested the Samba FORCE USER on a share and it will enforce ownership but this is on the share itself. I need the directories beneath the share to enforce individual ownership. In essence, I have set the user and group ownership on individual directories and need to enforce it while using Samba. I can recreate each user directory as a share but this is not efficient. Shares with user directories beneath, is a typical Windows configuration and is what I am familiar with. Is this not the preferred way of doing things in Samba? Thank you for your help. Here is my smb.conf.

[global]
workgroup = MYDOMAIN
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = No
idmap gid = 10000-20000
idmap uid = 10000-20000
realm = MYDOMAIN.LOCAL
security = domain
template homedir = /home/%D/%U
template shell = /bin/bash
local master = no
preferred master = no
winbind refresh tickets = yes
domain logons = No
domain master = No
password server = *
wins support = No
wins proxy = no
wins server = dc1.MYDOMAIN.local
remote announce = dc1.MYDOMAIN.local/MYDOMAIN
netbios name = FILESVR

[AcctUsers]
comment = Accounting Users
admin users = @"MYDOMAIN\Domain Admins" @"MYDOMAIN\AcctAdmins"
path = /shares/AcctDept/Users
read only = no
browseable = yes
write list = @"MYDOMAIN\AcctUsers"
create mask = 771
directory mask = 771
inherit permissions = yes
inherit acls = yes
 
Old 12-29-2011, 03:55 PM   #2
jillges
LQ Newbie
 
Registered: Aug 2003
Location: Sanford, Florida
Distribution: OpenSuse
Posts: 7

Original Poster
Rep: Reputation: 0
I solved this issue. The directory owner just needed to be able to edit files created by other users and I was attempting to relying on the 'owner' for permissions. Instead, I just used SETFACL to add explicit permissions for the directory owner and they are now able to read new files created by other users. So simple yet I spent hours reading trying to figure this out. I decided to break it down and figured out the issue was permissions, not ownership.

Thnx
 
  


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
How do I set multiple group/user ownership of files and folders? Syllinger Linux - Newbie 3 10-21-2011 01:49 AM
Ownership on new files in group samba share set badly pentalive Linux - Server 1 08-26-2011 03:03 AM
NFS and Samba Share Ownership Issue worm5252 Linux - Server 3 12-16-2009 06:58 PM
How do I enforce in Red hat linux that only root user be a member of the "root" group sultf Linux - Security 4 01-08-2009 04:42 PM
User and Group file ownership... Weird bourne Linux - Security 2 10-29-2008 09:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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