Setting permission on a folder within a dataset

Guys, have a question. I have a SMB dataset set up on a pool. I used Windows to add directories, 6 of them, under that dataset, but they don’t show up when I choose the dataset tab, only the main dataset shows. How can I add a user to the permissions on only one of those directories? I want the apps user to be able to see one of them, but I don’t want the apps user to have access to the other 5, just the 1. I have googled the crap out of this and it keeps telling me to add the permissions in the dataset tab, but they don’t show up there. I know there has to be a way to do this, I’m just not smart enough to figure it out. Thanks :slight_smile:

When editing the acls check the apply permissions recursively checkbox and re apply the acls

Datasets and directories are not the same thing. To get the control you want you would need to add those directories as child datasets so that you can control access to each. I think that if the parent is shared as smb then you will see all the datasets under that share in windows and they will look and feel like directories but come with the permissions set in truenas. I haven’t tried this myself but pretty sure that is how it will work.

As a side point the reason why I say this is that a while ago I tried to make a single nfs share with child datasets and when I shared this out the child datasets did appear but the data actually went under a same named directory, so when I went into truenas the child was empty and it was the parent that had the space allocated. This confused the heck out of me and I posted on here for help. Ended up answering it myself and turns out it was in the documentation that sharing a parent with child datasets was not supported in nfs. I think it is in smb so that is probably how you should set it up. See the blue note box in the nfs page: Adding NFS Shares | TrueNAS Documentation Hub

On your current set up if you go into the shell and look inside your share dataset you will see the files you have created but they are not datasets - just folders.

You will need to create new datasets as children.

…is correct.

If you want to keep the names the same, I’d suggest this process:

  • Rename your current directory slightly (e.g. Folder1temp instead of Folder1)
  • Create the new dataset with the correct name (e.g. Folder1)
  • Copy the contents of the temporary directory to the new dataset which looks like a directory now
  • Edit the ACL of the new dataset in however you want it and check “Apply permissions recursively”
  • Check that everything is as you’d like it
  • Delete the temporary directory

If you don’t care about the name, just create a new dataset and follow the rest of the steps as they apply.

AFAIK a directory (or “folder” in Windowsland) can’t be changed to a dataset. It might be possible via the CLI but I don’t think there is any scenario where it’s worth it.

That’s kind of what I was afraid I would end up having to do. I am moving from Core to Scale and importing my old pools, and it’s going to be a pain to set the new permissions. Oh well, the price of progress :slight_smile:

You should be able to import your whole configuration including the pools and not have those issues. Are you staying on the same hardware?