bluepine

Active Member
Dec 17, 2001
37
0
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
 

sparek-3

Well-Known Member
Aug 10, 2002
2,096
244
368
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
 

bluepine

Active Member
Dec 17, 2001
37
0
306
Hello,
Thanks for your reply.

Try enabling this and seeing if it fixes your problem with suPHP_UserGroup in the VirtualHost entries.
This did not work, but it's not a big problem, I solve it in 5 seconds after creating each account.

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
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
 

fatepower

Registered
Nov 3, 2007
3
0
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
 
Last edited: