Hi!
I have a directory, /var/log/smartd, where smartd writes logfiles about failing hard drives (through a script running with the fsdaemon_t context).
I also want to access this directory using home assistant running in a podman container. Mounting it in podman with the :z flag marks it as container_t, meaning smartd can’t write to the directory.
I have temporarily made smartd unconfined, which works, but isn’t very pretty. Is there a better solution? Can I somehow mark a directory as not audited? Can I allow fsdaemon_t access to container_t?
I am not very knowledgeable about selinux, but since this is a multi-user system I don’t want to turn it off.
So:
I have a conflict. smartd running with fsdaemon_t wants to write to /var/log/smartd. That directory is mounted in a podman container and is relabeled container_t, preventing smartd from writing to it. Can I somehow allow smartd to write to it, despite podman relabeling it container_t?
Best regards
Linus