Webmail Clients and Permissions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • James Butler

    Webmail Clients and Permissions

    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!
  • James Butler

    #2
    Re: Webmail Clients and Permissions

    Okay...I'm upgrading to Apache 2 and Sendmail 8.12.9. I'll follow-up
    after that, hopefully with good news!

    stupidscript@ho tmail.com (James Butler) wrote in message news:<5e377339. 0308281431.4059 f5f9@posting.go ogle.com>...[color=blue]
    > 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![/color]

    Comment

    • James Butler

      #3
      Re: Webmail Clients and Permissions

      Got it. I did not, yet, upgrade Sendmail, although I did upgrade
      Apache...but that wasn't the problem.

      I made /var/spool/mqueue GROUP-writable. Since "nobody" was not the
      owner of the directory, but IS in the "root" group, this simple chmod
      fixed the problem.

      Thanks!

      Comment

      Working...