[CentOS] SELinux and daemons - clever way to change default locations?

Sat Apr 21 00:30:17 UTC 2007
Florin Andrei <florin at andrei.myip.org>

Florin Andrei wrote:
> 
> In the particular case of moving /var/lib/mysql to the separate 
> filesystem /db, it's enough to mount /db with the same SELinux context 
> like /var:
> 
> mount -o defcontext=system_u:object_r:var_t /db

Actually, in /etc/fstab you have to append a :s0 otherwise it won't 
mount automatically at boot:

LABEL=/db /db ext3 defcontext=system_u:object_r:var_t:s0 1 2

-- 
Florin Andrei

http://florin.myip.org/