Permissions for directory inside dataset

a g

Cadet
Joined
May 25, 2022
Messages
4
Hi,
Lets say that inside my pool I have a dataset called 'sales' and samba share from it. Inside this dataset I have a lot of files and directories which everyone from 'sales_department' group can access, modify, etc. but inside this 'sales' directory I would like to have one directory called for example 'managment' and only group called 'managers' could access it.

How can I do that? I know I could create another dataset and samba share but I have couple of that kind of situation and I don't wan't to have a lot of folders when go to my server.

Thank you
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
I'm thinking that you're overthinking this. All you need is to set the permissions for the "management" folder to only allow "managers" group to access it. It's really that simple.
 

a g

Cadet
Joined
May 25, 2022
Messages
4
Well I know the logic behind this but I just didn't know how to do this in TrueNas :) Basically I did it like this: in 'sales' I've added dataset called 'management' and set permissions. Is that good approach ?
I didn't knew that by creating dataset inside dataset it would be visible as standard directory without creating samba share.

Now I have:

- pool
-- sales (dataset)
--- management (dataset)
--- other files and folders which are not dataset's and was just created by users inside samba share 'sales'
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
You don't need datasets to manage permissions. In general, I only recommend creating datasets when you need separate dataset features (for example, encryption, deduplication, quotas).

I want to say that sharing won't cross filesystem boundaries (which is what a dataset is), so what you're doing may not work correctly (though I may be wrong about this).

In my opinion, the easiest way to manage permissions is directly through Windows. You can right-click on a folder, and change the permission from directly in Windows Explorer when you're browsing the share.
 

a g

Cadet
Joined
May 25, 2022
Messages
4
Directly from Windows? Really? Wait but you have to have a Active Directory with Domain, etc. ? If so I don't have that.
 

Nick2253

Wizard
Joined
Apr 21, 2014
Messages
1,633
Top