Ask Your Question
0

Fedora 23: semanage: command not found (even with policycoreutils)

asked 2015-12-13 01:50:44 -0600

GPistre gravatar image

I am trying to configure SELinux to give read/write access to samba in a specific directory (following the instructions in this question)

But I cannot get the semanage command to work. I installed policycoreutils-python, but to no avail.

which semanage

gives me

usr/bin/which:no semanage in (...)

Anything I missed?

edit retag flag offensive close merge delete

Comments

to check SELinux status:

$ /usr/sbin/getenforce

or

$ /usr/sbin/sestatus

To temporarily change SELinux policy (use 1 at the end for enforcing and 0 for permissive). E.g.:

$ sudo /usr/sbin/setenforce 1

To changed read/write permission, I often use the chown command

singlechair gravatar imagesinglechair ( 2015-12-13 14:32:15 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2015-12-13 03:01:13 -0600

geforce gravatar image

policycoreutils-python is the wrong package, you need policycoreutils-python-utils

$ rpm -qf $(which semanage)
policycoreutils-python-utils-2.4-17.fc23.x86_64
edit flag offensive delete link more

Comments

I indeed missed the difference between policycoreutils-python and policycoreutils-python-utils...

GPistre gravatar imageGPistre ( 2015-12-13 18:43:02 -0600 )edit
2

answered 2015-12-13 07:48:22 -0600

updated 2015-12-15 10:24:19 -0600

rpm -qf $(which semanage) does not work if the package is not installed.

In this case, as the OP does NOT have semanage on the system

which semanage gives me

usr/bin/which:no semanage in (...)

So in that event, use dnf

dnf provides '*/semanage'

yields

dnf provides '*/semanage'
Last metadata expiration check performed 0:05:14 ago on Sun Dec 13 06:44:26 2015.
policycoreutils-python-utils-2.4-17.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : @System

policycoreutils-python-utils-2.4-14.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : fedora

policycoreutils-python-utils-2.4-17.fc23.x86_64 : SELinux policy core python
                                                : utilities
Repo        : updates
edit flag offensive delete link more

Question Tools

Stats

Asked: 2015-12-13 01:50:44 -0600

Seen: 7,146 times

Last updated: Dec 15 '15