User Tools

Site Tools


модуль_selinux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
модуль_selinux [2024/08/23 09:32]
val [Конфигурация]
модуль_selinux [2026/07/21 13:47] (current)
val [Добавление сетевых портов к типу (домену) контекста безопасности]
Line 39: Line 39:
  
 # yum install policycoreutils-python-utils # yum install policycoreutils-python-utils
-# semanage fcontext -l | grep '/​var/​www'​+# semanage fcontext -l | grep '/​var/​www/html'
  
 # restorecon -v /​var/​www/​html/​index.html # restorecon -v /​var/​www/​html/​index.html
Line 49: Line 49:
 ===== Добавление сетевых портов к типу (домену) контекста безопасности ===== ===== Добавление сетевых портов к типу (домену) контекста безопасности =====
  
-  * [[Сервис Firewall#​CentOS]] firewalld (для демонстрации темы можно отключить)+  * [[Сервис Firewall#​CentOS, AlmaLinux]] firewalld (для демонстрации темы можно отключить)
  
   * [[https://​access.redhat.com/​documentation/​ru-ru/​red_hat_enterprise_linux/​5/​html/​deployment_guide/​rhlcommon-section-0085|50.2.11. Running a Command in a Specific Security Context]]   * [[https://​access.redhat.com/​documentation/​ru-ru/​red_hat_enterprise_linux/​5/​html/​deployment_guide/​rhlcommon-section-0085|50.2.11. Running a Command in a Specific Security Context]]
Line 55: Line 55:
  
 <​code>​ <​code>​
-# ps axZ | grep ssh+# ps axZ | grep [s]sh
  
-# ss -tupanZ | grep ssh+# ss -tupanZ | grep [s]sh
  
 # runcon -t sshd_t -r system_r -u system_u /​usr/​sbin/​sshd -p 2222 -d # runcon -t sshd_t -r system_r -u system_u /​usr/​sbin/​sshd -p 2222 -d
модуль_selinux.1724394747.txt.gz · Last modified: 2024/08/23 09:32 by val