Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Problems with easyapache3/suPHP

Discussion in 'EasyApache' started by bluepine, Sep 24, 2007.

  1. bluepine

    bluepine Active Member

    Joined:
    Dec 17, 2001
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    306
    Greetings all,
    I installed last month CPanel on a new server. The WHM version is 11.2.0. I compiled Apache 2 with PHP4 support (most of my clients still have applications which are not compatible with PHP5) and I manually installed PHP5. Everything works very well except for a couple of things:

    1) PHP4 works now with suPHP but every time I create an account it adds SuexecUserGroup instead of suPHP_UserGroup (I fix this every time I create a new account by a quick search replace in httpd.conf, but still would be nice to have the right setting written to httpd.conf).

    2) This second issue is a bit more serious. Most of the scripts that allow some sort of directory creation/file upload are not working properly. Infact it seems that suPHP ignores the user's umask; all the directories are 744 and it's then impossible to open them by Apache. I tried to change the user's umask to make newly created directories 755 (and it works at command line) but every time I create a new directory from a script it has correct owner and group (my user) but wrong mode (744). I then changed the umask for a test user to 0 and still the php script creates the directory as 744. I checked around and found some documentation for suPHP and apparently it has a configuration file where it's possible to specify the umask to use in the form:

    umask=022

    (so more similar to a php.ini directive than an apache one) but I could not find that file anywhere (it's supposed to be called suphp.conf).

    Any idea on how to fix this?

    Thank you in advance

    Stefano
     
  2. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,675
    Likes Received:
    84
    Trophy Points:
    328
    cPanel Access Level:
    Root Administrator
    Do you have PHP open_basedir Tweak enabled in the WHM Security Center?
     
  3. bluepine

    bluepine Active Member

    Joined:
    Dec 17, 2001
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    306
    No, it's not enabled. And the problem shows up also for directories created inside the document root (hence, visible by the webserver).
     
  4. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,675
    Likes Received:
    84
    Trophy Points:
    328
    cPanel Access Level:
    Root Administrator
    Try enabling this and seeing if it fixes your problem with suPHP_UserGroup in the VirtualHost entries.

    As far as the suphp.conf file, I'm not sure where easyapache3 installs this at. Try a:

    locate suphp.conf

    and if that doesn't work, you may need to update your locate database:

    updatedb

    then

    locate suphp.conf
     
  5. bluepine

    bluepine Active Member

    Joined:
    Dec 17, 2001
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    306
    Hello,
    Thanks for your reply.

    This did not work, but it's not a big problem, I solve it in 5 seconds after creating each account.

    I did that, the file ended up being in /opt/suphp/etc/. I changed the umask there and everything now works perfectly, The umask was set to 0033.

    Thank you for your help!

    Stefano
     
  6. fatepower

    fatepower Registered

    Joined:
    Nov 3, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    could this also be a part of my umask problem?
    I upload a image with a php script the image file get permission 600 and not 644 as it should get. Cuz of the chmod 600 its impossible to read the image file on the website. I need to manually go with ftp or ssh and set the permission to 644 then all users can see the image on the webserver. Now the umask in my suhp.conf i setted to umask=0022. How do i fix so the image files who get uploaded by the php script get the chmod 644 instead of 600?
    I have in my suphp.conf the umask setted to 0022 but i still have the problem :/

    Cheers
     
    #6 fatepower, Nov 3, 2007
    Last edited: Nov 4, 2007
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice