Bugzilla – Bug 15852
SELinux is preventing /usr/libexec/mysqld "unlink" access on /var/lib/squeezeboxserver/cache/squeezebox-mysql.sock
Last modified: 2016-11-27 21:11:01 UTC
Summary: SELinux is preventing /usr/libexec/mysqld "unlink" access on /var/lib/squeezeboxserver/cache/squeezebox-mysql.sock. Detailed Description: SELinux denied access requested by mysqld. It is not expected that this access is required by mysqld and this access may signal an intrusion attempt. It is also possible that the specific version or configuration of the application is causing it to require additional access. Allowing Access: You can generate a local policy module to allow this access - see FAQ (http://fedora.redhat.com/docs/selinux-faq-fc5/#id2961385) Please file a bug report. Additional Information: Source Context unconfined_u:system_r:mysqld_t:s0 Target Context system_u:object_r:mysqld_db_t:s0 Target Objects /var/lib/squeezeboxserver/cache/squeezebox- mysql.sock [ sock_file ] Source mysqld Source Path /usr/libexec/mysqld Port <Unknown> Host (removed) Source RPM Packages mysql-server-5.1.42-2.fc12 Target RPM Packages Policy RPM selinux-policy-3.6.32-69.fc12 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name catchall Host Name (removed) Platform Linux (removed) 2.6.31.12-174.2.3.fc12.i686.PAE #1 SMP Mon Jan 18 20:06:44 UTC 2010 i686 i686 Alert Count 2 First Seen Sun 24 Jan 2010 02:55:38 AM IST Last Seen Sun 24 Jan 2010 02:55:47 AM IST Local ID ada77b93-b8f2-4b78-a1e0-4384321efbe3 Line Numbers Raw Audit Messages node=(removed) type=AVC msg=audit(1264294547.183:40072): avc: denied { unlink } for pid=3803 comm="mysqld" name="squeezebox-mysql.sock" dev=dm-0 ino=1179 scontext=unconfined_u:system_r:mysqld_t:s0
The problem is squeezeboxserver sets up the following context: sh-4.0# rpm -q --scripts squeezeboxserver | grep "semanage fcontext -a" [ -x /usr/sbin/semanage ] && /usr/sbin/semanage fcontext -a -t mysqld_db_t "${CACHEDIR}(/.*)?" [ -x /usr/sbin/semanage ] && /usr/sbin/semanage fcontext -a -t mysqld_var_run_t "${CACHEDIR}/squeezeboxserver-mysql.sock" "squeezeboxserver-mysql.sock" should be changed to "squeezebox-mysql.sock" The proper label should be set using: semanage fcontext -a -t mysqld_var_run_t "/var/lib/squeezeboxserver/cache/squeezebox-mysql.sock" see: https://bugzilla.redhat.com/show_bug.cgi?id=558163
I didn't get this message until AFTER I upgraded from 7.4.2 to 7.5x (7.5.0-0.1.30391) I don't think I see the error if I install 7.5x on a clean system (with no upgrade)
(In reply to comment #2) > I didn't get this message until AFTER I upgraded from 7.4.2 to 7.5x > (7.5.0-0.1.30391) I don't think I see the error if I install 7.5x on a clean > system (with no upgrade) This is still an issue for me, after a fresh 7.5.1 install on a RHEL6 box.
Here's the full list I needed to get it up and running happy on RHEL6: port -a -t mysqld_port_t -p tcp 9092 fcontext -a -f 'all files' -t mysqld_var_run_t '/var/lib/squeezeboxserver/cache' fcontext -a -f 'all files' -t mysqld_db_t '/var/lib/squeezeboxserver/cache(/.*)?' fcontext -a -f 'all files' -t mysqld_etc_t '/var/lib/squeezeboxserver/cache/my.cnf' fcontext -a -f 'all files' -t mysqld_log_t '/var/lib/squeezeboxserver/cache/mysql-error-log.txt' fcontext -a -f 'all files' -t mysqld_var_run_t '/var/lib/squeezeboxserver/cache/squeezebox-mysql.pid' fcontext -a -f 'all files' -t mysqld_var_run_t '/var/lib/squeezeboxserver/cache/squeezebox-mysql.sock'