User Tools

Site Tools


linux:selinux_cheatsheet

Differences

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

Link to this comparison view

Last revisionBoth sides next revision
linux:selinux_cheatsheet [2023/02/27 14:19] – created dodgerlinux:selinux_cheatsheet [2023/02/27 14:24] dodger
Line 1: Line 1:
 ====== [CHEATSHEET] selinux ====== ====== [CHEATSHEET] selinux ======
 +
 +====== Binaries ======
 +===== Add path as binaries to allow execution =====
 +<code bash>
 +semanage fcontext -a -t bin_t '/app/bin/.*'
 +</code>
 +
 +===== Change security context of files/folder =====
 +<code bash>
 +chcon -Rv -u system_u -t bin_t '/app/data/executable.sh'
 +</code>
 +
 +===== List defined paths by context =====
 +
 +<code bash>
 + semanage fcontext --list
 +</code>
 +
 +
  
  
Line 16: Line 35:
 </code> </code>
  
 +===== Empty =====
  
 +<code bash>
 +
 +</code>
linux/selinux_cheatsheet.txt · Last modified: 2023/02/27 14:25 by dodger