wwwrun failure in ispconfig?

Discussion in 'Technical' started by guybrush, Mar 2, 2006.

  1. guybrush

    guybrush New Member

    hi,

    i´ve got a question:
    many of you know about the wwwrun-failure. if you start a php-script, all files created by the script are owned by wwwrun or wwwdata... (depends on the distribution of linux). if you connect via ftp, you cannot delete the files, because you are not the owner.

    how does ispconfig handle this? is there a solution integrated in ispconfig?

    i have no time to test this out in the next some days (studies take a lot of time! :( ), but i can´t wait to know about the behaviour of ispconfig in this question...

    thanks in advance
    guybrush
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This is more a question of your server configuration then ISPConfig.

    To run scripts under the owner of the website and not wwwrun, you have at least 2 solutions:

    1) Use a php wrapper like SuPHP.
    2) Use PHP as CGI or fastcgi instead of mod_php and enable SuEXEC in ISPConfig.
     
  3. st2xo

    st2xo New Member

    edit the /etc/groups file and add the user wwwrun to that groups you want to give the access.

    edit the /etc/proftpd_ispconfig.conf and/or /etc/proftpd/proftpd.conf and change the umask so that all ftp-uploaded files are 775 (or 770)

    this works fine on my system - everybody (wwwrun/ftp-User) can modify the files!

    But be carefull with shell users!
     
  4. guybrush

    guybrush New Member

    @till:
    my base system (deb 3.1) is like the one from "the perfect setup".
    i thought, maybe ispconfig comes with an solution out of the box.

    @st2xo:
    thanks for your solution.
    i will try your solution first, (its the easier one *g*) and then, when
    i have a little free time, i´ll try tills.

    thanks anyway, i´ll post here how my research ended

    guybrush
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This can't be solved / configured completely by ISPConfig, beacuse ISPConfig uses the software from your linux distribution. When you start it is a bit more configuration, but on the long term you will be glad that you can simply use apt-get to update your system :)
     
  6. guybrush

    guybrush New Member

    @till

    yes, you´re right. i´m using apt-get on both deb and ubuntu and i´m loving ist ;-)
    i´m very glad that someone wrote this perfect tool

    i don´t know when i have time so try your tips. do you have any links or tutorials for me for your 2 solutions?

    thanks in advance
     
  7. falko

    falko Super Moderator ISPConfig Developer

  8. guybrush

    guybrush New Member

    if i use suphp, only php-scripts are run under another users uid? cgi-scripts (like perl or anything else) are not affected, or am i wrong?

    i read an article on http://apache-server.com/tutorials/LPsuexec.html
    somewhere in under prerequisites they say:
    that makes me a little worried about suexec. if something goes wrong, does suexec isnt just working or are there any serious securityrelated threads if configured unproperly?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    Yes, PHP scripts run under a different uid than that of the Apache user.

    If you run scripts with suExec or suPHP, the scripts must belong to the user and group they run under, otherwise you'll get a "500 Internal Server Error". That's the most common pitfall, but if you do it right it works like a charm.
     
  10. mattbrown

    mattbrown New Member

    hi
    can anybody help me out with mod_suphp

    ive tried installing this for about a day now and it just wont work.

    Im running fc4 with apache 2.0 i originally saw it listed in yum so gave

    yum install mod_suphp a go which seemed to load the module but do little else

    so ive tried following the steps from the projects website several times but again to no avail

    i have added the settings to my httpd.conf file and when i restart apache it seems to recognise them but all my php files in the virtual hos are still being run as apache

    also i dont seem to be able to find the /etc/suphp.conf
    or any directory in .etc called suphp

    however i got no errors etc when running make, make install
     
  11. falko

    falko Super Moderator ISPConfig Developer

    I thought you used yum to install mod_suphp? Now you say you compiled it yourself? :confused:

    Anything in the Apache error log?
     

Share This Page