chcon
chcon changes the SELinux security context of the selected files.[1]
- GNU Coreutils [EN] @ Fedora Package
- GNU Coreutils [EN] @ Homebrew Formula
Documentation
- chcon [EN] @ GNU Coreutils Manual
- man 1 'chcon' [EN]
Parameters
- -r ROLE, --role=ROLE
- Set ROLE in the target security context.
- -t TYPE, --type=TYPE
- Set TYPE in the target security context.
- -u USER, --user=USER
- Set USER in the target security context.
- -h, --no-dereference
- Affect symbolic links instead of any referenced file.
- -R, --recursive
- Change files and directories recursively.
Examples
- Make repositories avaliable for Apache
chcon --recursive --no-dereference --type='httpd_sys_rw_content_t' \
'/var/svn/source' '/var/svn/sysconfig'