User permissions

Joined
Feb 9, 2019
Messages
5
I have windows datasets and a windows SMB share which I am trying to reset permissions on.
Due to the volume of data for whatever reason, this isn't working over the LAN from a windows PC which borks some hours into the process.

So now I have the delightful command line to deal with and I am struggling to find good examples. Most seem to be around linux and not necessarily supported on freeNas and also focus on linux use ,group, other style permissions.

I have drawn a diagram of what I'm trying to achieve :

permissions.jpg


I'd like to know how I apply these removing any existing permission so some examples of A, B, C and D would be massively helpful.
If I have any existing unix permissions would I need to remove these and if so how?
I figured I should be using setfacl?
Also if you had some examples of how then to remove a user/group from a folder that would be helpful too.

I've experimented with various things but struggled to achieve the desired results.

thanks!
 
Joined
Feb 9, 2019
Messages
5
Despite a distinct lack of documentation, I believe I have solved this now by playing around with windows permissions then using getfacl to look at the permissions ....

some of the example commands I used are below and you can modify the permissions to get the desired results.
It looks like you have to use "find" to apply permissions recursively as there is no -R parameter in freeBSD as far as I can tell.


this gives read only access to the users folder
setfacl -m group:myUsers:r-x---a-R-c---:fd-----:allow users

applies to modify rights to the user folder
find user1/ -type d -exec setfacl -m user:dan:rwxp-daARWc---:fd----:allow {} \;

applies modify rights to the user files
find user1/ -type f -exec setfacl -m user:dan:rwxp-daARWc---:------:allow {} \;

you can also replace user with group: or change :allow to :deny

I was surprised how hard it was to find good documentation for this. In one case I got an error which I could find no explanation for so I had to look at the code to figure out where it was coming from!

It would seem like a fairly obvious feature for FreeNAS to include a simple file explorer GUI to apply these permissions
 
Top