replied to sender directly instead of the list.
- Thomas
Betreff: | Re: SELinux and user home dirs custom contexts |
---|---|
Datum: | Sun, 1 Jan 2017 12:43:44 +0100 |
Von: | Thomas Mueller <thomas@chaschperli.ch> |
An: | info@joomladev.eu |
Hi
maybe related to semanage.conf usepasswd param? see man semanage.conf:I'm using SELinux with CentOS 7 for many years but I have problem with labeling of home dirs. In my policy and in semanage fcontext --list|grep '/var/www/hosts/ak-chalupova.cz' I have custom labels of files: ----------------------------------------------------------------------------------------------------------------------- /var/www/hosts/ak-chalupova.cz(/.*)? all files system_u:object_r:ak-chalupova_cz_t:s0 /var/www/hosts/ak-chalupova.cz/logs(/.*)? all files system_u:object_r:ak-chalupova_cz_log_t:s0 /var/www/hosts/ak-chalupova.cz/mail(/.*)? all files system_u:object_r:ak-chalupova_cz_mail_t:s0 /var/www/hosts/ak-chalupova.cz/ak-chalupova.cz/cgi-bin(/.*)? all files system_u:object_r:ak-chalupova_cz_cgi_t:s0 /var/www/hosts/ak-chalupova.cz/ak-chalupova.cz/cgi-bin/php.fcgi all files system_u:object_r:ak-chalupova_cz_cgi_exec_t:s0 ----------------------------------------------------------------------------------------------------------------------- but when I run restorecon -R -v /var/www/hosts/ak-chalupova.cz/ it tries to label all files as user_home_t: ----------------------------------------------------------------------------------------------------------------------- restorecon reset /var/www/hosts/ak-chalupova.cz context unconfined_u:object_r:ak-chalupova_cz_t:s0->unconfined_u:object_r:user_home_dir_t:s0
/var/www/hosts/ak-chalupova.cza symlink to somewhere?
realpath /var/www/hosts/ak-chalupova.cz