Is there somewhere else I can put my binary where it’ll work (ideally not somewhere it’ll be intermingled with other stuff like /usr/local/bin)? Is it a FCOS bug that the /opt symlink making SELinux behave differently to how it seems to be intended?
Have you confirmed that it is an selinux issue? That is, have you run “sudo setenforce 0” then tried again once selinux was turned off to confirm that it works without selinux running?
How is it that /opt is linked to /var/opt? Mine has 2 distinct directories, not linked. Also, both have the same selinux context.
I am running workstation and not coreOS but that seems the only difference
Yes, with SELinux disabled everything works as expected.
/opt being a symlink is just how Fedora CoreOS is set up. AIUI, FCOS is very different to Workstation, in that it’s rpm-ostree based and probably more similar to Silverblue.
[core@diglett ~]$ sudo restorecon -RFv /opt/matterbridge/bin/matterbridge
Relabeled /var/opt/matterbridge/bin/matterbridge from unconfined_u:object_r:var_t:s0 to system_u:object_r:var_t:s0
It still doesn’t work after doing that. The only log entry that seems to correspond is this:
Unfortunately semanage is not installed on Fedora CoreOS. But the advice still applies as nothing relabels the files on Fedora CoreOS during updates so you should be able to change the context to the right one and this should then work.