Hello all,
I have a fairly new Truenas scale 25.10 setup. I’m trying to figure out containers on it because there are some very useful tools for nas systems missing from truenas scale. I really wish I could just have these tools in the core system and not use a container, so that I can manage scripts and such all through the UI and not have to go to a container to configure some scripts and the UI to configure others. I can do install-dev-tools to fix it and add the tools to the base system, but seems the “proper” method is to use containers. So, I’m trying to figure out how to set that up so I don’t have to worry about an update breaking all my scripts when install-dev-tools gets disabled or something. However, I cannot seem to figure out dataset permissions for containers.
I set up a container using the ubuntu noble image. For disks I passed my /mnt/storage/ dataset in as /mnt/storage on the container as well. I have a child dataset /mnt/storage/scripts. I see the scripts folder under /mnt/storage on the container, however if I go into it I can’t see any of the files.
In the documentation under containers it just says this:
To grant container root access to host data:
Assign permissions on the host dataset to the truenas_container_unpriv_root user.
Access the dataset from inside the container as root.
When the container root accesses the path, it uses the host permissions of truenas_container_unpriv_root.
But, no clear instructions on how exactly to do that. If I go to my datasets and look at the storage/scripts dataset, I have it configured right now where it’s owned by root and the group is shareusers. Both with full permission. Other currently has read and execute.
I don’t see any way to grant this “truenas_container_unpriv_root” user permissions using this method. If I go to Credentials and look up the unpriv_root user, it won’t let me add shareusers to the auxillary groups like I do for my other users that can access this. It errors saying
[EPERM] Users provided by a directory service must be modified through the identity provider (LDAP server or domain controller).
Even though I’m not using an LDAP server or domain controller. So, I don’t really know what it’s talking about there.
So, I thought maybe I have to do it through an ACL on the dataset. I’m not familiar with ACLs at all. But I tried configure the ACL anyway. I started with a POSIX_RESTRICTED template.
User obj - default - root = Read write execute default
Group obj - default - share users = read write execute default
Other - default = None
User obj - root = read write execute
Group obj - share users = read write execute
Other = none
So, then I tried adding
User truenas_container_unpriv_root = read write execute
It complains about
Named (user or group) POSIX ACL entries require a mask entry to be present in the ACL.
Don’t really understand what a mask entry is but I add a mask entry and give it read write execute just to see if I can get it working. Nope, still can’t see any files under this dataset in the container.
So maybe I need to apply the ACL recursively? I try that, and still no. Still can’t see any of the files under the dataset.
I’ve tried various other ACL entries in multiple different configurations and can’t find anything that works.
So, I’m really confused on how to set these permissions so that I can access these files from within the container. I have this dataset and one other that will need full read / write / execute permissions in the container to be able to run the scripts that I’m wanting to run.
Any advice would be greatly appreciated.