FreeNAS Groups and Windows ACLs - working together?

Status
Not open for further replies.

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
Should the groups you create in FreeNAS be visible to Windows when trying to set permissions?

Scenario: Dataset called "Media", FreeNAS group called "media_users". Media_users is the group owner of the dataset, Windows ACLs. Dataset shared as a CIFS share.

"media_users" shows up in the Windows permissions list for the share (as "Unix group FREENAS/media_users" or something similar), and can be removed. However, it cannot be re-added via Windows. I am unsure if this is intended behavior and me being confused, or something else. I'm likely trying to do something the wrong way....


In any case, what I'd like to do (unsure if possible, and certainly set up wrong currently on my system):

1) Control top level access to the "Media" dataset based on membership of FreeNAS users (matching Windows logons/password) in the FreeNAS "media_users" group.

2) Restrict access to certain subdirectories in the "Media" dataset to certain users, based on their FreeNAS accounts, which I can add via Windows permissions dialogs (adding FreeNAS user accounts to directory permissions via Windows works fine), and removing access to the restricted directories by the whole group by removing the "media_users" group or restricting it's permissions to those directories.

Example use case: UserA and UserB are both part of "media_users" group, and by default have full access (via group ownership of the share and/or setting the group permissions via Windows) to the data. Create a new directory (or modify an existing directory) within the Media dataset, and edit it's permissions such that all members of the group do NOT have access to it, by explicitly denying the "media_users" group traverse (I'm forgetting the windows term) access to the directory, and adding specific FreeNAS users (UserA) and setting their permissions via Windows permissions dialogs.

Is this possible (I'm rather certain is it somehow, but I'm not sure how to accomplish it, and if I can do it using Unix groups on FreeNAS in combination with setting the directory/file permissions in Windows).

Thanks!

EDIT: I think I may have screwed something up while experimenting on this yesterday - I did what this issue (http://support.freenas.org/ticket/1892) says not to, and used the GUI to set the permissions recursively on my media dataset set to Windows ACLs. It took forever, and generated ton of log traffic in the console (mainly syntax errors?), but allowed me to then set the permissions directly in Windows, which for some reason I was unable to do before this for some reason despite being the owner of the share (permission denied on all subdirectories when trying to set them). Is there some way I can check if these ACLs are now damaged? And am I really going to have to recreate the entire volume, or just the dataset? Or can I fix them?
 

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
Any ideas? Even a pointer to a good primer on permissions would be helpful. Any ideas about how I can do what I want, even if it's solely through either the FreeNAS or Windows permissions.

Thanks!
 

SkyMonkey

Contributor
Joined
Mar 13, 2013
Messages
102
Seriously nobody can help me? I just need some resources for self-education at this point...
 

jefferson

Cadet
Joined
Dec 6, 2013
Messages
2
Hello there! Man did you manage to add groups via windows explorer permissions settings? Im having the same problem as you, the UNIX Group of the dataset is set in folder permissons every time I create a folder. but if I remove this group I cannot add it back again. Add users to folders permissions works fine. It seems windows explorer cannot find the groups i created in freenas. Please give me some light.. thank you!
 

alexg

Contributor
Joined
Nov 29, 2013
Messages
197
Windows does not see Unix groups. You need to set them up in Samba by creating a mapping to ntgroup. I created a little script that is invoked from "init/shutdown scripts" as "post init" script. This allowed me to select "ShareUsers" from Windows

#!/bin/bash
/usr/local/bin/net groupmap add ntgroup="ShareUsers" unixgroup=shareusers type=d rid=512
 

jefferson

Cadet
Joined
Dec 6, 2013
Messages
2
Hello alexg! I will give it a try tonight. Thanks alot for you attention and script code.
 

Skyfox

Explorer
Joined
Jul 15, 2013
Messages
50
Windows does not see Unix groups. You need to set them up in Samba by creating a mapping to ntgroup. I created a little script that is invoked from "init/shutdown scripts" as "post init" script. This allowed me to select "ShareUsers" from Windows

#!/bin/bash
/usr/local/bin/net groupmap add ntgroup="ShareUsers" unixgroup=shareusers type=d rid=512

I was just having this issue myself. Thanks again for a solution, I will give it a try later today.
 

M H

Explorer
Joined
Sep 16, 2013
Messages
98
Was this a good solution? I'm having a nightmare of a time with permissions and Windows ACLs.
 
Status
Not open for further replies.
Top