Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    I'm having problems building Apache with suExec and PHP 5.2.3 - when I do it, I get an Internal Server Error on my php pages. Anyone know anything about this? I read somewhere that I have to run a utility to change the permissions on the scripts after doing this, but I'm not sure what I have to do or how to do it. Thanks for any help.

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    You probably have to add the setuid/setgid bits to the relevant scripts (with chmod, the related flag is [minicode]s[/minicode]). It's also possible you need to set this on the actual Apache executable.

    Be very sure you know what you're doing before using suexec, though. It can open up some security holes.

  4. #3
    Member
    Join Date
    Apr 2007
    Posts
    96
    Member #
    15165
    You might want to read up on unix style file permissions.
    suexec enables apache to run the php scripts as though it were a different user.

    If apache is invoking the php scripts as the unix user johndoe, then the php scripts need to have file permissions set so that johndoe can run them.

  5. #4
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Through WHM, it sets up suexec to run php scripts as the user whose account owns the domain. For example, if I have a client with the username transio who has the website transio.com, it would execute php scripts through his username.

    It would also give the php scripts his filesystem permissions, which would allow me to upload / move / manipulate files without setting folder permissions to 777.

    I'm not sure how else to do it... it's either use suexec or set folders to 777. Any other ideas?

  6. #5
    Member
    Join Date
    Apr 2007
    Posts
    96
    Member #
    15165
    That sounds like the correct way, file, folders would be owned by transio

    The webserver would have suexec set to transio through the virtual host...
    http://httpd.apache.org/docs/1.3/suexec.html#usage

    If it is still failing, maybe you can check the logs and get a more specific error message?

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Ah, I see what you're trying to do. Anyway, all I was saying was to be real careful In your context, it makes perfect sense; it just takes a lot of care to ensure no unintended consequences occur.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 05:58 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com