gemlog/public/uk/fix-selinux-is-preventing-systemd-machine-from-search.gmi

35 lines
No EOL
1.5 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Виправлення помилки "selinux is preventing systemd-machine from search" на Fedora 43
При перенесенні копії образу операційної системи Debian 13, при запуску QEMU / virt-manager виникло сповіщення безпеки:
> selinux is preventing systemd-machine from search access on the directory ...
Як підказує ШІ, причина така:
> Це відомий баг у політиці SELinux для Fedora, пов'язаний із тим, що systemd-machined намагається отримати доступ до каталогів процесів віртуальних машин (зазвичай при зупинці VM).
Вирішив наступним чином:
``` bash
sudo ausearch -c 'systemd-machine' --raw | audit2allow -M my-systemdmachine
sudo semodule -X 300 -i my-systemdmachine.pp
```
Якщо з'являється попередження конфлікту пріоритетів:
> libsemanage.semanage_direct_install_info: A higher priority my-systemdmachine module exists at priority 400 and will override the module currently being installed at priority 300.
```
sudo semodule -X 400 -r my-systemdmachine
```
Додатково, виправив права:
``` bash
sudo chcon -t virt_content_t /var/lib/libvirt/images/debian13.qcow2
```
## Посилання
=> https://bugzilla.redhat.com/show_bug.cgi?id=2407206
=> https://bugzilla.redhat.com/show_bug.cgi?id=2412722