Hi!
Recently I’ve been having some issues installing some systemd-related utilities like auto-epp on my SIlverblue installation (F41 on my Lenovo Yoga laptop). Just wanted to highlight the steps to address these types of issues if you happen to hop on one
This happens because Silverblue (like on normal Fedora Workstation) has the tag user_home_t for the /home directory. Which means that for every executable that is present on the home folder, SELinux will address that and say “hell no man, you can’t be executed here!”
So what I did, was changing the SELinux context for a certain folder in my system that I created exactly for the scope of having user executable files (e.g. Auto-EPP, but bucklespring could be another case) on the .local/bin folder. In fact, by doing:
sudo semanage fcontext -a -t bin_t "/var/home/idunno/your/folder/structure"
Followed by
sudo restorecon -R -v "/var/home/idunno/your/file/location.sh"
Addresses the issue, at least for me. Be careful, of course, that’s my way of fixing the issue, ymmv, but at least we’re covering the issue since I haven’t really found anything online in regard of this argument, so I hope it can be covered as well
What does the single commands do?
That’s a nice question: semanage is used to adjust SELinux file context where it is needed, the fcontext adjust a specific file or folder structure with the argument -a -t, in this case, executable (bit_t)
restorecon, on the other hand, is used to restore the original SELinux context of the folder structure. In this case, since we’ve changed in bin_t, now it has to be updated to reflect the folder’s changes.
That’s all!
Also, my issue raised because I wanted to keep my executables in a folder into the /home directory. You might wanna do some changes in your specific scenario, like using the executable on a podman container for example