Permissions and owners
The semanage command
Manages SELinux settings: ports and file contexts.
Syntax
semanage [port -l | fcontext -a -t tipo ruta]Most useful options
port -lLists port typesfcontextManages file contextsCopy-ready examples
$ semanage port -lShow port types$ sudo semanage fcontext -a -t httpd_sys_content_t /var/wwwLabel a pathYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- After changing fcontext you must apply it with restorecon.
Related commands
FAQ
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course