Copyright © tutorialspoint.com
| Tag | Description |
|---|---|
| -a, --add | |
| Add a OBJECT record NAME | |
| -d, --delete | |
| Delete a OBJECT record NAME | |
| -f, --ftype | |
| File Type. This is used with fcontext. Requires a file type as shown in the mode field by ls, e.g. use -d to match only directories or -- to match only regular files. | |
| -h, --help | |
| display this message | |
| -l, --list | |
| List the OBJECTS | |
| -L, --level | |
| Default SELinux Level for SELinux use, s0 Default. (MLS/MCS Systems only) | |
| -m, --modify | |
| Modify a OBJECT record NAME | |
| -n, --noheading | |
| Do not print heading when listing OBJECTS. | |
| -p, --proto | |
| Protocol for the specified port (tcp|udp). | |
| -r, --range | |
| MLS/MCS Security Range (MLS/MCS Systems only) | |
| -R, --role | |
| SELinux Roles. You must enclose multiple roles within quotes, separate by spaces. Or specify -R multiple times. | |
| -P, --prefix | |
| SELinux Prefix. Prefix added to home_dir_t and home_t for labeling users home directories. | |
| -s, --seuser | |
| SELinux user name | |
| -t, --type | |
| SELinux Type for the object | |
| -T, --trans | |
|
SELinux Translation
| |
# View SELinux user mappings $ semanage user -l # Allow joe to login as staff_u $ semanage login -a -s staff_u joe # Add file-context for everything under /web (used by restorecon) $ semanage fcontext -a -t httpd_sys_content_t "/web(/.*)?" # Allow Apache to listen on port 81 $ semanage port -a -t http_port_t -p tcp 81 |
Copyright © tutorialspoint.com