suphp error message /home/www not owned by ?

Discussion in 'Installation/Configuration' started by sirion, May 27, 2008.

  1. sirion

    sirion New Member

    Hi, i got a problem on a fedora core 7 setup running latest stable ispconfig using the suphp setup.

    trying to install oscommerce i get an
    500 error - Internal Server Error!

    looking at the log files of the site i see the following error message

    [Tue May 27 07:44:24 2008] [error] [client 86.88.206.172] SoftException in Application.cpp:499: Directory /home/www is not owned by web65_info

    [Tue May 27 07:44:24 2008] [error] [client] Premature end of script headers: index.php

    Ive choosen to use /home/www for the sites, am i missing something ?

    best regards,
    Hennie
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    In which directory did you install oscommerce?
     
  3. sirion

    sirion New Member

    suphp error message

    sites are in /home/www

    so /home/www/web65/web/oscommerce

    thanks
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /home/www
    and what's in /etc/suphp.conf?
     
  5. sirion

    sirion New Member

    suphp error message

    ls -la /home/www
    drwxr-xr-x 57 apache apache 4096 2008-05-27 07:29 .
    drwxr-xr-x 7 root root 4096 2008-02-11 09:04 ..
    drwxr-xr-x 8 web65_info web65 4096 2008-05-28 04:00 web65
    lrwxrwxrwx 1 apache web65 15 2008-05-27 07:29 www.DOMAINNAME.nl -> /home/www/web65


    /etc/suphp.conf

    [global]
    ;Path to logfile
    logfile=/var/log/suphp.log

    ;Loglevel
    loglevel=info

    ;User Apache is running as
    webserver_user=apache

    ;Path all scripts have to be in
    docroot=/

    ;Path to chroot() to before executing script
    ;chroot=/mychroot

    ; Security options
    allow_file_group_writeable=true
    allow_file_others_writeable=false
    allow_directory_group_writeable=true
    allow_directory_others_writeable=false

    ;Check wheter script is within DOCUMENT_ROOT
    check_vhost_docroot=true

    ;Send minor error messages to browser
    errors_to_browser=false

    ;PATH environment variable
    env_path=/bin:/usr/bin

    ;Umask to set, specify in octal notation
    umask=0077

    ; Minimum UID
    min_uid=100

    ; Minimum GID
    min_gid=100

    [handlers]
    ;Handler for php-scripts
    x-httpd-php=php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper

    ;Handler for CGI-scripts
    x-suphp-cgi=execute:!self
     
  6. falko

    falko Super Moderator Howtoforge Staff

    What's in /home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper?
    Is PHP Safe Mode enabled or disabled?
     
  7. sirion

    sirion New Member

    suphp error message

    Hi,

    #!/bin/sh
    PATH="/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/libexec"

    BASEDIR=`dirname ${DOCUMENT_ROOT}`
    TMPDIR=${BASEDIR}/phptmp
    SESSDIR=${TMPDIR}

    if [ X"${php_safe_mode}" != X"On" ]; then
    SAFE_MODE="Off"
    else
    SAFE_MODE="On"
    fi

    exec php-cgi -d open_basedir=${BASEDIR} -d upload_tmp_dir=${TMPDIR} -d session.save_path=${SESSDIR} -d safe_mode=${SAFE_MODE}
     
  8. sirion

    sirion New Member

    suphp error message

    in /etc/php.ini

    safe_mode = On
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Can you set safe_mode to off and restart Apache?
     
  10. sirion

    sirion New Member

    suphp error message

    Problem stays after setting /etc/php.ini safe_mode to off

    SoftException in Application.cpp:499: Directory /home/www is not owned by web65_info
     
  11. falko

    falko Super Moderator Howtoforge Staff

  12. Feanwulf

    Feanwulf New Member

    got the same problem on a new server - and I did install following the instructions!
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Is it also a Fedora system?
     
  14. Feanwulf

    Feanwulf New Member

    I am running on a debian etch with suphp 0.6.3 (not 0.6.2)
     
  15. falko

    falko Super Moderator Howtoforge Staff

    I've added this to our bugtracker, but I know it was working when I wrote the tutorial.
     
  16. Feanwulf

    Feanwulf New Member

    i will try to compile 0.6.2 tomorrow and will tell you if that works better!
     
  17. Feanwulf

    Feanwulf New Member

    compiling suphp0.6.2 works great - suPHP is working!

    I think there is a bug in suphp06.3
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Thank you for verifying this. In my opinion, it makes suphp useless if it complains when a upper folder in the folder hierarchy is not owned by the same user. This would mean that with suphp 0.6.3 all websites folders have to be in / and not in e.g. /var/www
     

Share This Page