The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Running apache using user other than nobody prevents access to cpanel and whm

Discussion in 'EasyApache' started by BP Steven, Jun 12, 2003.

  1. BP Steven

    BP Steven Active Member

    Joined:
    Apr 30, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    When I run apache as a user other than 'nobody', users cannot access cpanel or whm using the scriptaliases domainname.com/cpanel and domainname.com/whm. They can however access the control panels using port numbers instead.

    The permissions in /usr/local/cpanel/base are set correctly (755), but it still doesn't work. I checked the error log and it said Premature end of script headers: /usr/local/cpanel/base/redirect.cgi

    Has anyone else come across this problem and know how to fix it?

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  2. BP Steven

    BP Steven Active Member

    Joined:
    Apr 30, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Additional information from suexec_log. centurio is the username of the account I was trying to access.

    [2003-06-12 13:30:10]: crit: calling user mismatch (apache instead of nobody)
    [2003-06-12 13:31:14]: crit: calling user mismatch (apache instead of nobody)
    [2003-06-12 13:38:13]: crit: calling user mismatch (apache instead of nobody)
    [2003-06-12 13:38:16]: crit: calling user mismatch (apache instead of nobody)
    [2003-06-12 13:39:17]: info: (target/actual) uid: (centurio/centurio) gid: (cent
    urio/centurio) cmd: redirect.cgi

    cPanel.net Support Ticket Number:

    cPanel.net Support Ticket Number:
     
  3. tAzMaNiAc

    tAzMaNiAc Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sachse, TX
    One question.. Why are you running it as apache and not nobody?
    Purpose of that?

    cPanel.net Support Ticket Number:
     
  4. BP Steven

    BP Steven Active Member

    Joined:
    Apr 30, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Security. I like to setup the directories holding the websites so that only the apache user and file owner can access the files, by changing the directory group to apache, and then chmod to 710.

    cPanel.net Support Ticket Number:
     
  5. BP Steven

    BP Steven Active Member

    Joined:
    Apr 30, 2003
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I've found solution to the problem just in case anyone else was interested (pretty obvious, should have thought of it sooner). suexec needs to be recompiled to use the apache user rather than nobody. That, or turn off suexec.

    cPanel.net Support Ticket Number:
     
  6. janglin

    janglin Registered
    PartnerNOC

    Joined:
    Jun 6, 2003
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Can you by any chance describe how you did this? I am unsure of the commands to run. Thanks.
     
Loading...

Share This Page