I think I locked myself out of my data because I don't properly understand permissions or datasets

I’m very new to TrueNAS and I’m going to do my best to convey the important details here, but I have definitely done a few things that I’m not remembering, or that I may not understand the significance of.

I have an existing 4TB dataset called Storage and associated SMB share with the same name, and a user called primary that I use to access it. Mainly this user is for my Windows PC, but I’ve also used this username for pretty much every device that needs access to the SMB, and it’s mostly been fine.

Today I decided I would get fancy and create a new user named music specifically for a music streaming device (Home Assistant, if it matters). I set the home directory for this user to be Storage/Music, and immediately user primary lost access to that folder (but still had access to the rest of Storage). I tried changing the home directory of music back to /var/empty but this didn’t fix things for primary.

So, thinking that music must have taken permissions away from primary for the Storage/Music folder, I went back to the ACL for the top-level Storage share, set primary permission to “full control,” checked the box for “apply permissions recusrively,” and saved. It took a while for TrueNAS to finish the operation, but it did complete.

Now, here’s the crazy thing. Suddenly the Storage share looks empty when accessed from my PC using primary. As you might imagine, I freaked out a bit, thinking I had somehow deleted everything, but then I noticed that the available disk size was suddenyl 1 TB instead of 4 TB. When I went to look at my datasets, the Storage set is still there, and it’s still the same size (3 TB), but now there’s a subset, Storage/primary, that’s has like 100kb showing as used and 1 TB of available space (exactly the size of the unused space in the original dataset).

Okay, so TrueNAS created a subset for primary for some reason. I deleted it, thinking maybe if I got rid of it and reset the permissions then I would regain access to the main Storage dataset. No dice; TrueNAS keeps re-creating it.

It certainly looks like all of my original data is still there but I have no idea what to do next to get access to it again. Help?

If you go to the dataset from the UI, what do the permissions look like?

Click on Datasets
Select the dataset in question
Then the permissions tab. Can you post a screenshot?

Then on the permissions select the edit button, screenshot.

Then on that edit page select set acl, then press cancel if it asks to set on then post that screenshot.

“Home directories” for TrueNAS users are only for users that use the shell. Userids you define just to access storage don’t need a home directory - and this is almost certainly your issue because Home directories get initialised with specific sets of permissions.

1 Like

Thanks so much for the reply! Yes, the permissions for Storage are as follows:

owner@ - primary: Allow | Full Control
group@ - primary: Allow | Full Control
everyone@ - Allow | Modify

The permissions for the user-specific subdirectory Storage/primary are as follows. I’m not sure why everything is listed twice.

owner@ - primary: Allow | Full Control
owner@ - primary: Allow | Full Control
group@ - primary: Allow | Full Control
group@ - primary: Allow | Full Control
everyone@ - Allow | Modify
everyone@ - Allow | Modify

From the way I read these, it seems like I shouldn’t have any trouble accessing the main dataset. Thoughts on next steps?