Показаны различия между двумя версиями страницы.
Предыдущая версия справа и слева Предыдущая версия | |||
linux:selinux [2011/10/10 14:17] linko22@gmail.com [Fully Disabling SELinux] |
linux:selinux [2011/10/10 14:18] (текущий) linko22@gmail.com [Re-Enabling SELinux] |
||
---|---|---|---|
Строка 92: | Строка 92: | ||
If you've disabled SELinux as in the section above, and you want to enable it again then you've got a bit of work to do. The problem will be that files created or changed when SELinux was disabled won't have the correct file labels on them - if you just reboot in enforcing mode then a lot of stuff won't work properly. | If you've disabled SELinux as in the section above, and you want to enable it again then you've got a bit of work to do. The problem will be that files created or changed when SELinux was disabled won't have the correct file labels on them - if you just reboot in enforcing mode then a lot of stuff won't work properly. | ||
- | What you need to do is to enable SELinux by editing / | + | What you need to do is to enable SELinux by editing |
After booting into permissive mode, run | After booting into permissive mode, run | ||
- | fixfiles relabel | + | <code bash>fixfiles relabel</ |
Alternatively, | Alternatively, | ||
- | touch / | + | <code bash>touch / |
and reboot or put | and reboot or put | ||
- | autorelabel | + | <code bash>autorelabel</ |
on the boot command line - in both cases the file system gets a full relabel early in the boot process. Note that this can take quite some time for systems with a large number of files. | on the boot command line - in both cases the file system gets a full relabel early in the boot process. Note that this can take quite some time for systems with a large number of files. | ||
After relabelling the filesystem, you can switch to enforcing mode (see above) and your system should be fully enforcing again. | After relabelling the filesystem, you can switch to enforcing mode (see above) and your system should be fully enforcing again. |