🐧 Linux 総合学習プラットフォーム
SELinux

semanage コマンド

semanage {fcontext|port|boolean} …

SELinuxポリシーを恒久的に調整する。ファイル文脈の既定・許可ポート・booleanを管理する。

使用例

semanage port -a -t http_port_t -p tcp 80808080をHTTP許可ポートに追加
semanage fcontext -a -t httpd_sys_content_t "/home/www(/.*)?"公開先の既定文脈を登録

関連する学習トピック

📖 SELinux とサービス(拒否の犯人を見抜く)

同じカテゴリのコマンド

getenforcesetenforcesestatusrestoreconsetseboolchcon

▶ 学習アプリで「semanage」を練習する