CGI Not Working

Discussion in 'General' started by mphayesuk, Jun 25, 2006.

  1. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Ok I am using suse 10 64bit which means that apache will use /srv/www by default for suexec.

    So when I was installing ispconfig I made sure I changed the doc root to /srv/www and under the management>setting>web the doc root is set correctly.

    After the main install I tested everything and it was all good and working. I updated the system to 2.2.3 a couple of days ago and now my cgi's dont work, if I turn off suexec they work and when it is on they dont (I get the error 500 internal server error page)

    When running ls -la on the hello_world.pl file I get:

    -rwxrwxrwx 1 web6_mhayes web6 379 Jun 25 14:39 /srv/www/web6/cgi-bin/hello_world.pl

    So it looks like everything is running ok but still cant get the .pl to run.

    Any Ideas.

    Thanks
     
  2. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Additional Info

    output of suexec -V

    server1:~ # /usr/sbin/suexec2 -V
    -D AP_DOC_ROOT="/srv/www"
    -D AP_GID_MIN=96
    -D AP_HTTPD_USER="wwwrun"
    -D AP_LOG_EXEC="/var/log/apache2/suexec.log"
    -D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
    -D AP_UID_MIN=96
    -D AP_USERDIR_SUFFIX="public_html"


    Last few lines of my suexec log file:

    [2006-06-25 14:45:25]: uid: (10017/web6_mhayes) gid: (10006/10006) cmd: hello_world.pl
    [2006-06-25 14:45:25]: file is writable by others: (/srv/www/web6/cgi-bin/hello_world.pl)
    [2006-06-25 14:45:32]: uid: (10017/web6_mhayes) gid: (10006/10006) cmd: hello_world.pl
    [2006-06-25 14:45:32]: file is writable by others: (/srv/www/web6/cgi-bin/hello_world.pl)
    [2006-06-25 14:45:39]: uid: (10017/web6_mhayes) gid: (10006/10006) cmd: novice.cgi
    [2006-06-25 14:45:39]: file is writable by others: (/srv/www/web6/cgi-bin/novice.cgi)
    [2006-06-25 14:51:38]: uid: (10019/web7_mhayes) gid: (10007/10007) cmd: hello_world.pl
    [2006-06-25 14:51:38]: file is writable by others: (/srv/www/web7/cgi-bin/hello_world.pl)

    Thanks
     
  3. mphayesuk

    mphayesuk Member HowtoForge Supporter

    Well if I had looked at the last post I did with the same question I would have known the answer.

    However doing a command line chmod 755 perlfile works, I created web6 and web7 and put the sample .pl files in and niether of them worked, so if I have 100 customers uploading .pl files at the moment to make them work I will need to chmod all of them from the command line..... this cant be right.

    So what is the problem.....

    Thanks
     
  4. mphayesuk

    mphayesuk Member HowtoForge Supporter

    OR is it a case of when a customer uploads the .pl file they must always chmod the file to 755 and then it will work???

    Thanks
     
  5. falko

    falko Super Moderator Howtoforge Staff

    You/your customers must chmod the file to 755. When you upload the file with FTP, it has permissions of 644 or maybe 664, not 777.
     

Share This Page