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
In case someone else runs across this same problem here is my temporary work around.
- create a directory outside of /tmp
- chmod 777 dir
- chcon -t httpd_sys_script_rw_t dir
- edit lib/speller/server-scripts/spellchecker.php and set $tempfiledir equal to that directory