Test Files

Discussion in 'General' started by falko, Aug 1, 2005.

  1. mlz

    mlz New Member

  2. vogelor

    vogelor ISPConfig Developer ISPConfig Developer

    YES YOU'R right!
    i didn't know that the /cgi-bin dir was an alias and so "linked" direct into the web. when i now point to www.muv.local/cgi-bin/hello_world.pl i am a little bit better. til now i got a 404 file not found. from now on i get a 500 internal server error. i think this is a little bit better. the next thing to do is to check the log-files. i'l do this tomorrow!
     
  3. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Make sure hello_world.pl is executable. Also switch off SuExec for now (until you get it working).
     
  4. vogelor

    vogelor ISPConfig Developer ISPConfig Developer

    Got It!!!

    THAT'S IT i looked into the error log and found, that suexec stops execution if the file is writeable by others than the owner!!!!

    chmod to 777 is TO MUCH RIGHTS! All can write the script an suexec generates a error 500!!!

    chmod 755 is exactly what suexec needs an the script runs!!!

    @til
    maybe we should add a cronjob which runs every 30 minutes and changes the rights, because if a user uploads a script and didn't know this he sets the wrong parameter and a 500 error is generated (and the user thinks the provider makes something wrong).
     
  5. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I don't think it's a good idea to incapacitate users with a cron job. If we did this, we will have dozens of posts asking why ISPConfig changes the permissions of scripts without asking... :(
     
  6. vogelor

    vogelor ISPConfig Developer ISPConfig Developer

    you are right. This is in deep a problem. but the other side is: how many users didn't know anything about rights. they upload a file and wonder why the script returns a 500 error.

    maybe a hint at the 500-page itself is a good idea?

    by the way: suphp has the same "problem". ISPConfig by default sets the document-root of the web to "group writeable" and your howto for suphp at this site sets the config of suphp to "create error if the dir is group writeable". This means, suphp will not work if u install suphp like your howto says. only after changing
    Code:
    allow_directory_group_writeable=true
    instead of false, suphp works fine. If you don't change the line you get a 500
     
  7. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    But I didn't write the tutorial for use with ISPConfig. Not all tutorials on this web site are related to ISPConfig.
     
  8. vogelor

    vogelor ISPConfig Developer ISPConfig Developer

    i know. what i exact mean was "the howto at your site".

    And this was not meant as a critic, this was meant as a "good to know" or "maybe one should change the howto and add a comment for ISPConfig" ;)
     
  9. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    I know. :)
     
  10. Daisy

    Daisy New Member

    yep. Yucky zip. File is corrupted.
     
  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    As I said before it's working for me, so the file cannot be corrupted. Have you tried to download it again?
     
  12. Daisy

    Daisy New Member

    yeah. Using latest version of winrar.
     
  13. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    I've downloaded it and extracted it with winrar without problems.
     
  14. martinfst

    martinfst New Member Moderator HowtoForge Supporter ISPConfig Developer

    Just a hunch: did you dwld it to you windowze box and then upload it to your server with FTP? If so, did you select binary transfer?
     
  15. astewart

    astewart ISPConfig Developer ISPConfig Developer

    I'm also getting the Internal Server (500) Error when running the hello_world.pl when Suexec is Enabled. No errors when Suexec is Disabled.
    I've checked the Log file and it shows this output:
    "Premature end of script headers: hello_world.pl"

    Does anyone know what might be causing the problem or how to fix this?

    Thanks!
     
  16. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Is the file owned by the web administrator user and group and which permissions has the file?
     
  17. astewart

    astewart ISPConfig Developer ISPConfig Developer

    File ownership:
    User - web6_astewart
    Group - web6
    (Which is correct)

    The CHMOD is 755, tried with 777 but same results.
    Works fine with Suexec disabled.

    Anyone else experiencing the same thing??
    :(
     
  18. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Can you post the output of
    Code:
    ls -la /path/to/hello_world.pl
    and the web6 vhost configuration from Vhosts_ispconfig.conf?
     
  19. astewart

    astewart ISPConfig Developer ISPConfig Developer

    Here is the output :
    Code:
    -rwxr-xr-x 1 web6_astewart web6 379 2007-05-22 13:25 /var/www/web6/cgi-bin/hello_world.pl

    Ahhh, Stupid Question, where do I locate that file (Vhosts_ispconfig.conf)? :confused:
     
  20. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Depends on your distribution. Somewhere in /etc/pache2/vhosts, /etc/httpd/vhosts, /etc/httpd/conf/vhosts, ...
     

Share This Page