cifs share permissions with samba v4?

Status
Not open for further replies.

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
I am wondering in FreebSD where the permissions are stored that I create from a Windows client on a share that I am connecting to. I want to change the share so that EVERYONE on the domain does not have access to this samba share with full control, heck I also do NOT want everyone to have any access to any files on the samba share. So I want the permissions to be Domain Admins : Full, Domain/Administrator : Full and Domain Users/Change.

Where is this setting saved when I make the change on the share from a windows server?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
I am wondering in FreebSD where the permissions are stored that I create from a Windows client on a share that I am connecting to. I want to change the share so that EVERYONE on the domain does not have access to this samba share with full control, heck I also do NOT want everyone to have any access to any files on the samba share. So I want the permissions to be Domain Admins : Full, Domain/Administrator : Full and Domain Users/Change.

Where is this setting saved when I make the change on the share from a windows server?
It depends on how you are manipulating the permissions. If you are using the "secuity tab" and if you are using windows ACL type, then they are mapped to native zfs nfsv4 ACLs, which you can manipulate and set locally via "setfacl" and "getfacl".

If you are using something like compmgmt.msc, then permissions are written to share_info.tdb.
 

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
Is there a standard way to set generic permissions so that there is enough access for the domain administrator to connect to via compmgmt.msc and fine tune permissions or totally replace them? Like just enough permissions that I can customize the way I want it? Do the UNIX / Samba4 service permissions ever stomp the permissions I set via compmgmt.msc?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
Is there a standard way to set generic permissions so that there is enough access for the domain administrator to connect to via compmgmt.msc and fine tune permissions or totally replace them? Like just enough permissions that I can customize the way I want it? Do the UNIX / Samba4 service permissions ever stomp the permissions I set via compmgmt.msc?
To clarify: windows servers have a few different permissions you can set on file shares.
First there are the 'share permissions' that you typically can manipulate through compmgmt.msc. these have been around for ages. (I think introduced in windows NT).
Next there are NTFS permissions that contain your standard 13 atomic priveleges and corresponding molecular priveleges, which you typically manipulate through Explorer.

In FreeNAS, the former are mapped to a tdb (database) file, the latter are mapped to ZFS access control entries (which are largely similar to NTFS ACEs). Because of the different way they are stored, it is impossible for them to clobber each other.

All that being said, I think you are best off leaving the share permissions open and using Explorer to set the NTFS permissions on the share. Less complex and less chance to accidentally screw something up. To ensure 'domain admins' have 'full control', make sure you configure dataset permissions so that they own the dataset being shared.

As far as share permissions go, on my AD member server, domain admins were automatically granted the requisite rights. If this is not the case, then you need to grant sediskoperatorprivelege rights to the group. I think the syntax is "net RPC rights grant '\DOMAIN\domain admins' SeDiskOperatorPrivelege -Uadministrator" but you will need to google and verify.
 
Status
Not open for further replies.
Top