Red Hat Bugzilla – Bug 289141
Refused drupal write access to /tmp
Last modified: 2007-11-30 17:12:15 EST
Description of problem: Drupal attempted to write to /tmp and selinux stopped it.
Version-Release number of selected component (if applicable):
As installed with FC7
Messy. Install Drupal. Try to set up a page with an image.
Steps to Reproduce:
2.Enter an image location
3. Read the results.
user warning: Can't create/write to file '/tmp/#sql_1796_0.MYI' (Errcode: 13)
query: SELECT DISTINCT b.* FROM blocks b LEFT JOIN blocks_roles r ON b.module =
r.module AND b.delta = r.delta WHERE b.theme = 'chameleon' AND b.status = 1 AND
(r.rid IN (2) OR r.rid IS NULL) ORDER BY b.region, b.weight, b.module in
/var/www/html/includes/database.mysql.inc on line 172.
SummarySELinux is preventing /usr/libexec/mysqld (mysqld_t) "search" to tmp
(httpd_sys_script_rw_t).Detailed DescriptionSELinux denied access requested by
/usr/libexec/mysqld. It is not expected that this access is required by
/usr/libexec/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 AccessSometimes labeling
problems can cause SELinux denials. You could try to restore the default system
file context for tmp, restorecon -v tmp If this does not work, there is
currently no automatic way to allow this access. Instead, you can generate a
local policy module to allow this access - see FAQ Or you can disable SELinux
protection altogether. Disabling SELinux protection is not recommended. Please
file a bug report against this package.
I have no idea what drupal is. But this looks like you have mysql tring to read
a tmp directory labeled httpd_sys_script_rw_t?
/tmp should never be labeled httpd_sys_script_rw_t?
That's the selinux context.
You have a denial of mysqld_t searching a tmp directory labeled
httpd_sys_script_rw_t. This is bad labeling.
I don't know what you mean by that's the selinux context. I know it is. I
believe someone has used chcon -t httpd_sys_script_rw_t on a directory named "tmp"
mysql is trying to search this directory and expects it to be labeled tmp_t.
Yes, it was me.
I sought and failed to find better documentation on selinux for setting
contexts. Only stuff I found was marked FC5.
I lost xfs for the same reason.
I re-installed FC7 to clear it up. Even that reports violations on
a default install!
Now running selinux on 'tell me' mode. Waste of space currently and bloody
Clear this bug if you wish.
If you are yum updated to latest fc7 policy and labeling is correct, you should
not see avc messages. If you do please send me the /var/log/audit/audit.log.
Created attachment 198101 [details]
audit log from newly installed OS