Just getting started with Selinux on a Fedora 27 droplet from Digital Ocean. Apparently the semanage
command is not installed by default. Every tutorial I've read refers to this command. I need to set the selinux context for a directory that contains a systemd-nspawn container. Normally we would run something like this:
$ semanage fcontext -a -t svirt_sandbox_file_t "/path/to/mycontainer(/.*)?"
$ restorecon -R /path/to/mycontainer/
Very surprised to find Fedora 27's documentation is not up-to-date on selinux. Just a hodge-podge of old docs and articles that refer primarily to yum
packages, stating that the selinux tools are installed by default. All of them refer to the semanage
command.
I mean, if I sudo dnf search selinux
, a million packages show up, including the policycoreutils
packages, which seem to be the ones that most of the tutorials refer to. But I'm more concerned with the lack of information. I thought selinux shipped complete on Fedora.
What am I missing here? Is there another way of setting selinux context? Should semanage
work out of the box on Fedora?
$ rpm -qf --qf '%{name}\n' $(which semanage)
policycoreutils-python-utils
sestatus
to see if SELinux is actually available though.