Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my laptop I use Fedora 17 distro for the first time and I'm having some issues adding rules to semodule

An example:

# grep httpd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

And the output is:

libsemanage.semanage_get_lock: Could not get direct transaction lock at /etc/selinux/targeted/modules/semanage.trans.LOCK. (Resource temporarily unavailable). semodule: Failed on mypol.pp!

I searched for information related to the issue, but I can't seem to find anything.

So, any ideas on where to go or what to do to fix this issue?

share|improve this question
First off I would like to know what were the AVC's you are trying to allow? Did you check for an appropriate boolean? The transaction lock should only happen if another SELinux transaction is going at the same time. – user163807 Oct 8 '12 at 19:30

You probably don't need this now but I found this through googling for a solution so I will post my answer for anyone wondering how to solve this.


When you get an error message such as the above about a "lock file" and it says "resource temporarily unavailable" it usually means that for some reason the program is already running so you can't run it again.

So you need to find the program and end it.

Running the following searches the processes on the system for semodule

$ ps aux | grep semodule

It will return an output similar to this:

root      6288  0.0  0.1 229084  7652 pts/1    T    22:34   0:00 sudo semanage permissive -a httpd_t

The second column (the value 6288) is the id of the process that is already running.

You can kill it with this command.

$ sudo kill -9 6288

This answer helped me a little with the following solution.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .