Blog

Error when installing customized SELinux policy in CentOS 7 Core

If, in CentOS 7 Core, when you try to install a customized SELinux policy like the ones generated with

# grep sshd /var/log/audit/audit.log | audit2allow -M test_new_policy
```

you get this error:

# semodule -i test_new_policy.pp 
libsemanage.semanage_exec_prog: Child process /sbin/load_policy did not exit cleanly. (No such file or directory).
libsemanage.semanage_reload_policy: load_policy returned error code -1. (No such file or directory).
libsemanage.semanage_exec_prog: Child process /sbin/load_policy did not exit cleanly. (No such file or directory).
libsemanage.semanage_reload_policy: load_policy returned error code -1. (No such file or directory).
semodule:  Failed!

I have fixed it with

# mkdir /etc/selinux/targeted/modules/tmp  ```

Thanks to Eugene Pakhomov for giving me the clue, recommending its execution through strace to see which file or directory was missing…

Leave a Reply

Your email address will not be published. Required fields are marked *

Información básica sobre protección de datos

  • Responsable David Marín Carreño.
  • Finalidad Moderar los comentarios.
  • Legitimación Tu consentimiento.
  • Destinatarios Digital Ocean.
  • Derechos Acceder, rectificar y suprimir los datos.
  • Información Adicional Puede consultar la información detallada en https://davefx.com/es/aviso-legal/.

This site uses Akismet to reduce spam. Learn how your comment data is processed.