RHEL4 SELinux prevents aspell from reading /tmp

RHEL4 SELinux prevents aspell from reading /tmp

by Aaron Spike -
Number of replies: 1
SELinux is gaining popularity so it is probably important to discuss this as an issue larger than this specific problem. The default SELinux rules in RHEL4 prevent any process owned by the webserver from reading files located in /tmp. This breaks the spellcheck in the HTML editor. What is the best way to handle this?


avc:  denied  { read } for  pid=4240 comm="sh" name="aspell_data_j4sga4" dev=dm-0 ino=2878017 scontex
t=user_u:system_r:httpd_sys_script_t tcontext=user_u:object_r:httpd_tmp_t tclass=file
avc:  denied  { getattr } for  pid=4240 comm="aspell" name="aspell_data_j4sga4" dev=dm-0 ino=2878017
scontext=user_u:system_r:httpd_sys_script_t tcontext=user_u:object_r:httpd_tmp_t tclass=file
Average of ratings: -
In reply to Aaron Spike

Re: RHEL4 SELinux prevents aspell from reading /tmp

by Aaron Spike -
In case someone else runs across this same problem here is my temporary work around.
  1. create a directory outside of /tmp
  2. chmod 777 dir
  3. chcon -t httpd_sys_script_rw_t dir
  4. edit lib/speller/server-scripts/spellchecker.php and set $tempfiledir equal to that directory
Now to discuss with the SELinux folks and the Moodle folks what the best solution will be.