Instance containers and dataset right errors

Hi there !

I am starting to get not so new with truenas, but until now, I used it only for storage, and have a dedicated proxmox machine nearby.
However, I am trying to remove it, and migrate some services to truenas.

One of them is nginx, which I want to have with a dedicated ip address, and have port 80 and 443 directly available.

I managed to configure this, and it works quite well. I have my certificates working, and nginx ui is also working for easier management.

However, the site files are on a dedicated dataset, and of course, the container is run as root (unprivileged), while nginx is run as www-data.

On the dataset, I have a dedicated user (called webhost), with a specific uid, same for the group.

I am having issues making these files being delivered by nginx though, and I don’t know why.

This seems to be a right error, and based on the new documentation given by Truenas, there is a mapping option for the users uid and gid.
So, I used it, and assigned the user webhost to the www-data uid and gid with this panel, but this is not working at all.
I also tried to change the uid and gid of www-data to match the ones from webhost, but still no results.

Is it a bug on truenas side as it is still experimental, or am I doing something wrong here ?

Thanks for any help/reply :slight_smile:

Sometimes, you feel stupid…

I was so obsessed with the problem being rights, that I did not carefully checked the configuration in nginx. My config file was missing a “.conf”…

Problem solved, the rights work fine in the end.

1 Like