Setup:
Red Hat Linux 8.0
Apache 1.3.27
PHP 4.3.2
Sendmail 8.11.6
Other Info:
root:root /var/spool/mail
root:root /var/spool/mqueue
Apache running as nobody:nobody
Installations of everything in the "default" locations.
The Issue:
Using (a) a PHP-based webmail client and (b) the PHP mail() function,
I cannot seem to get both to be able to access the mqueue directory to
write temp files. For example, with the above setup, the webmail
clients work fine, however a simple mail("me@thatho st.com","Test
Subject","Test Message","From: me@thishost.com") is refused permission
to write to mqueue. If I change ownership of mqueue to nobody:nobody,
the simple mail() function works, but the webmail cannot get
permission to write its mqueue file.
maillog Error (with ownership set to root:root, mail() failing):
SYSERR(nobody): Can't create transcript file ./xxx: Permission denied
SYSERR(nobody): Cannot create ./xx2: Permission denied
from=nobody, size=0, class=0, nrcpts=0, relay=nobody@lo calhost"
(Substitute (root) for (nobody) when I switch ownership to
nobody:nobody, causing webmail to fail.)
Sorry, but please note again that when I change ownership on mqueue to
nobody:nobody, the PHP mail() function works fine.
I have tried several PHP webmail clients (BasiliX, NOCC, etc.) with
the same results. I have tried running Apache as root (not allowed,
and not safe anyway), as nobody (current condition), and as a
user:group I created just for mail stuff, with the same or worse
results.
Does anyone have any idea how I can get the mail() function to execute
with permissions to access that dang mqueue directory while it is
owned by root:root? I would sure appreciate any tips. Thanks!
Red Hat Linux 8.0
Apache 1.3.27
PHP 4.3.2
Sendmail 8.11.6
Other Info:
root:root /var/spool/mail
root:root /var/spool/mqueue
Apache running as nobody:nobody
Installations of everything in the "default" locations.
The Issue:
Using (a) a PHP-based webmail client and (b) the PHP mail() function,
I cannot seem to get both to be able to access the mqueue directory to
write temp files. For example, with the above setup, the webmail
clients work fine, however a simple mail("me@thatho st.com","Test
Subject","Test Message","From: me@thishost.com") is refused permission
to write to mqueue. If I change ownership of mqueue to nobody:nobody,
the simple mail() function works, but the webmail cannot get
permission to write its mqueue file.
maillog Error (with ownership set to root:root, mail() failing):
SYSERR(nobody): Can't create transcript file ./xxx: Permission denied
SYSERR(nobody): Cannot create ./xx2: Permission denied
from=nobody, size=0, class=0, nrcpts=0, relay=nobody@lo calhost"
(Substitute (root) for (nobody) when I switch ownership to
nobody:nobody, causing webmail to fail.)
Sorry, but please note again that when I change ownership on mqueue to
nobody:nobody, the PHP mail() function works fine.
I have tried several PHP webmail clients (BasiliX, NOCC, etc.) with
the same results. I have tried running Apache as root (not allowed,
and not safe anyway), as nobody (current condition), and as a
user:group I created just for mail stuff, with the same or worse
results.
Does anyone have any idea how I can get the mail() function to execute
with permissions to access that dang mqueue directory while it is
owned by root:root? I would sure appreciate any tips. Thanks!
Comment