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.

PHP as a group?

Discussion in 'General Discussion' started by brianc, Jun 29, 2008.

  1. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    I have a client who is having some issues with a modified version of phpBB that he is running on his web site. These issues started since we moved his account to a new server. I have not been told the exact nature of the problem but he did have this request:

    "My technical assistance team for domain.com says I need
    to ask you to "make PHP run as a group and not a user." He says you should
    know what he's talking about. This may be part of the cause of some of our
    problems since June 10."

    I have no idea what he is requesting. It is my understanding that php must run as a user and in the case of my setup, it is run as the user nobody. Does anyone know what they are asking?

    Thanks for any help.
     
  2. MaestriaNick

    MaestriaNick Well-Known Member

    Joined:
    Aug 6, 2008
    Messages:
    159
    Likes Received:
    3
    Trophy Points:
    18
    Hi,

    It seems he doesnt want PHP to be run under user ownership. He wants php to be run under apache ownership.

    So please check whether php is compiled with phpsuxec enabled. If yes, disable it . That will fix the issue for him.
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    There is no phpsuexec, only suPHP
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    The group permission where it comes to the web server and applications
    for it whether that be phpBB or something else is irrelevant.

    What matters is whether the PHP language itself is setup to run as a CGI
    or as an Apache module. For the former, the file permissions and ownership
    would need to be setup correctly for the file owner and for the latter, you
    would need to make sure the PHP script files in the program are at the
    very least world (global) readable.

    I personally do not recommend running PHP as an apache module just because
    of the raw amount of security vulnerabilities that comes with that which could
    lend itself to a whole separate long post on here discussing that topic.

    For your PHP language run as a CGI, I would recommend it be setup with SuPHP and
    with that, the client does not need to worry about any group permissions. All he / she
    needs is to make sure the files are owned by their own login name for their account and
    that the owner (first permission setting) is readable and executable. The group and
    global permissions can be setup to whatever they choose. Generally speaking,
    those two settings should be setup more restricted for security and will not effect
    the operation of phpBB forum software if PHP itself is setup as SuPHP.

    In any case, I would say that your client's problem deals more with the permissions
    of the PHP script files in their program than the ownership of those files unless you
    are running SuPHP and they think Apache runs as nobody (wrong!) and this is more
    of a case of them not knowing what they are doing. All they really need to do though
    is set the correct the permissions for your server and they should be back in business.

    Just for side note, I have run heavily modified phpBB forum software installations on
    hundreds if not thousands of servers over the years with PHP as an apache module,
    PHP as phpSuExec, SuPHP, custom PHP security configurations, and more and
    I can tell you first hand with absolute certainty, it will work fine with any of them!
    It is all just a simple matter of making sure the permissions are set correctly and
    that is pretty much the only differences as far as that goes.
     
    #4 Spiral, Aug 13, 2008
    Last edited: Aug 13, 2008
  5. brianc

    brianc Well-Known Member

    Joined:
    May 16, 2003
    Messages:
    141
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the help.

    The problem turned out that some of the modified code was not compatible with MySQL 5 and had to be changed.
     
Loading...

Share This Page