Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 27
  1. #1
    Member
    Join Date
    Apr 2004
    Posts
    320

    Exclamation Apache recompiled with PHPsuexec support

    Hello,

    Next week I'd like to recompile Apache on all our servers with PHPsuexec support.
    Each server, however, already contains over a hundred active accounts...

    Do I have to do something special to the installed PHP scripts or will they work regardless? I've read something about PHPsuexec being very picky about the file and directory permissions...

    Any help is greatly appreciated.
    Thanks.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge shashank's Avatar
    Join Date
    Apr 2003
    Posts
    146

    Default

    Here is some information about phpsuexec. You might want to check it out before doing it. It says world rightable scripts will not execute.

    http://www.cablan.net/cablan/What_is...ec_.449.0.html

    I guess this will cause problems to some previously installed CMSs.
    Shashank Wagh.
    Systems Administrator.
    http://www.shashank.net

  3. #3
    Member
    Join Date
    Apr 2004
    Posts
    320

    Default

    Hi,

    Thanks for the suggestion, but I've already checked out that site myself
    Actually, I'm looking for a (3rd party?) script that would set permissions correct (or just advise the correct settings) for "incompatible" scripts. Manual checking is too time-consuming for 100+ account per server...

    Thanks.

  4. #4
    Member
    Join Date
    Apr 2004
    Posts
    320

    Default

    I've read that suPHP is more stable.
    Any one experience in migrating from normal mode to CGI mode with suPHP support?

    Thanks.

  5. #5
    cPanel Partner NOC cPanel Partner NOC Badge shashank's Avatar
    Join Date
    Apr 2003
    Posts
    146

    Default

    Question really should be what kind of scripts do you run on the server ?
    Shashank Wagh.
    Systems Administrator.
    http://www.shashank.net

  6. #6
    Member
    Join Date
    Dec 2003
    Posts
    120

    Default

    just to be sure when i run
    /scripts/easyapache and then select option number 5
    that will build apache with PHPsuexec ? or just php

  7. #7
    Member
    Join Date
    Apr 2004
    Posts
    320

    Default

    All kinds of scripts are run on the server - whatever a customer has in his account....

    I guess I'll need a script which checks the permissions of a file/directory and changes it accordingly if it does not have "compatible" permissions. I just want to avoid tons of support questions because clients are receiving "Internal server" messages after recompiling.
    Is such a script somewhere out there?

  8. #8
    Member
    Join Date
    Dec 2002
    Location
    Australia
    Posts
    65

    Default

    Old post, but... if you're still around... did you manage to come across something like what you were after?

    I hate the 'nobody' user being created. I found nifty code here which allows easy chowning of users to their own user name, which I thought was great, however I have since realised this actually breaks some installed CMS' and the like which then attempt to rewrite as nobody the same files = invalid permissions = more support needed.

    So, I really, really desire to go suexec, but need a step-by-step migration plan that is successful which will reduce the impact upon my 350+ hosted clients.

    I found a file/folder changing permissions. But then there is the conversions of .htaccess commands I believe into php.ini that would likely be required... and anything else I am not aware of which could break peoples scripts.

    Still doing my searching, so hopefully I will come across something. But in the event I don't, does anyone know if something like this is around? I can't express how much I'd appreciate it.

  9. #9
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Kurieuo View Post
    Old post, but... if you're still around... did you manage to come across something like what you were after?

    I hate the 'nobody' user being created. I found nifty code here which allows easy chowning of users to their own user name, which I thought was great, however I have since realised this actually breaks some installed CMS' and the like which then attempt to rewrite as nobody the same files = invalid permissions = more support needed.

    So, I really, really desire to go suexec, but need a step-by-step migration plan that is successful which will reduce the impact upon my 350+ hosted clients.

    I found a file/folder changing permissions. But then there is the conversions of .htaccess commands I believe into php.ini that would likely be required... and anything else I am not aware of which could break peoples scripts.

    Still doing my searching, so hopefully I will come across something. But in the event I don't, does anyone know if something like this is around? I can't express how much I'd appreciate it.
    This is an incredibly old thread.

    You may want to simply check the boxes labeled "SuPHP" and "SuExec" in EasyApache 3 to enable SuPHP and SuExec support. phpSuExec is no longer supported (replaced with SuPHP).

  10. #10
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Quote Originally Posted by Kurieuo View Post
    Old post, but... if you're still around... did you manage to come across something like what you were after?

    I hate the 'nobody' user being created. I found nifty code here which allows easy chowning of users to their own user name, which I thought was great, however I have since realised this actually breaks some installed CMS' and the like which then attempt to rewrite as nobody the same files = invalid permissions = more support needed.

    So, I really, really desire to go suexec, but need a step-by-step migration plan that is successful which will reduce the impact upon my 350+ hosted clients.

    I found a file/folder changing permissions. But then there is the conversions of .htaccess commands I believe into php.ini that would likely be required... and anything else I am not aware of which could break peoples scripts.

    Still doing my searching, so hopefully I will come across something. But in the event I don't, does anyone know if something like this is around? I can't express how much I'd appreciate it.
    Unless you have a lot of customizing going on, you'll probably be fine. The EA3 script has come a long way and takes many things into concideration when run.


    These may be helpful to you to make sure all goes well.

    Code:
    Set owner of all user files
    
    Also you can run the following to ensure all users files are correctly owned.
    
    You can do this running the following commands in shell as root;
    
    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:$CPAccess /home/$CPAccess; done
    
    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:mail /home/$CPAccess/etc /home/$CPAccess/mail; done
    
    for CPAccess in `ls -A /var/cpanel/users`; do chown -R $CPAccess:nobody /home/$CPAccess/public_html; done
    Code:
    Set permissions of all user files
    
    find /home*/*/public_html -type d -perm 0777 -exec chmod 755 {} \;
    find /home*/*/public_html -type f -perm 0666 -exec chmod 644 {} \;

    Code:
    Find htaccess file with php_flags in them.
    
    find /home -name '.htaccess' -exec grep -i 'php_' {} \; -print
    
    
    find /home -name '.htaccess' -exec grep -i '' {} \; -print

  11. #11
    Member
    Join Date
    Dec 2002
    Location
    Australia
    Posts
    65

    Default

    Infopro - thanks for summarising everything in one post. Your steps were just what I was after as well as confirmation that this should resolve everything.

    Any issues that come up after enabling suphp (hopefully none) I will just deal with as they come in. Can't wait to be free from nobody!

  12. #12
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    I know the feeling and was concerned as well before jumping in.

    The water is warm though. Have fun!.

  13. #13
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Infopro View Post
    I know the feeling and was concerned as well before jumping in.

    The water is warm though. Have fun!.
    I hope that's not the kiddie pool you are in

  14. #14
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,894
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Some days it sure feels like it.

  15. #15
    Member
    Join Date
    Dec 2002
    Location
    Australia
    Posts
    65

    Default

    Haven't done this yet, as I am in the process of a server move and going to wait until that settles before making the switch.

    Just wondering, has anyone developed a script (or know of one existing) which translates .htaccess commands into the php.ini file? That would be extremely helpful! I haven't been able to come across one yet.
    Last edited by Kurieuo; 06-20-2008 at 08:45 AM.

Similar Threads & Tags
Similar threads

  1. Recompiled Apache, domain configuration broken
    By sneeka2 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-29-2007, 09:31 PM
  2. phpsuexec support 500
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-24-2006, 08:39 AM
  3. phpsuexec support
    By Secret Agent in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 03-16-2006, 11:10 PM
  4. recompiled apache & php... internal error
    By kerriritter in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-09-2005, 07:17 AM
  5. Recompiled entire server and its still Apache 1.3.27?
    By sexy_guy in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 07-30-2003, 10:11 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube