Ostree container commit permissions

For context, I been using the container layering part of ostree. And my problem right now is when I set permissions, ACLs xattr, and ownership to a directory it gets reset to root ownership. This happens during the ostree container commit call. How do I set the correct ownership for a directory?

My primary purpose for this is running some containers on an unprivileged user (rootless) for user with no-sudo or any privs.

In ostree container layers, you can only write things into /usr, and generally it is root:root owned.

If you want things in user home dirs and user owned then you need somethings else. Either copy it from /usr and edit it there or use another tool to do the configuration.

For content in /var, you should use tpmfiles configs.