This is a discussion on Re: Apache 2 + suexec = error + no logs!!! within the Linux Web Servers forums, part of the Web Server and Related Forums category; On 24 Jun 2003, Mathieu Dumais-Savard <matdumsa@hotmail.com> wrote: > Apache version : 2.0.46 Read ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On 24 Jun 2003, Mathieu Dumais-Savard <matdumsa@hotmail.com> wrote:
> Apache version : 2.0.46 Read the docs for SuExec. I have not used Apache 2, but generally virtual host directoriess have to be below main DocumentRoot (or whatever suexec was compiled for) in order to specify a user and group. SuExec typically ONLY works in /home/username/public_html for a /~username/ URL. One way to get around that for ease of access from centre's home dir, is to put the virtual host dir wherever the main htdocs dir is (owned by centre and their group), and symlink that to their home dir as something like www or html or centre. Then they will easily be able to access it for maintenance from their home dir by the symlink name. If you do not want that vhost path to be accessible from the default or other vhost paths (which could make script source visble from such path), you could control that with a <Location "/centre"> section in main server config. > setup: > > ><VirtualHost *> ><Directory /home/centre/public_html> > Options +ExecCGI +Includes > AddHandler cgi-script cgi pl ></Directory> > ServerAlias centre-dachats.com *.centre-dachats.com > ServerAdmin centre@centre-dachats.com > DocumentRoot /home/centre/public_html > ServerName www.centre-dachats.com > ErrorLog /home/centre/centre-dachats.com-error_log > CustomLog /home/centre/centre-dachats.com-access_log common > SuexecUserGroup centre apache ></VirtualHost> > > > users are in this way > /home/user1 > /home/user2 > /home/user3 > > their website are in public_html folder > /home/user1/public_html > etc... > > I want them to be able to execute cgi everywhere in their public_html > under their user with suexec... > > If i comment the line SuexecUserGroup centre apache everything work > fine... if i put > SuexecUserGroup centre apache it fail everywhere with a 500 telling > premature end of script header in the apache log's... But nothing in > the suexec log!!! > > When i run suexec from konsole logged as root, using > cd /usr/local/apache2/bin > ./suexec > > Suexec then write in my suexec.log : > [2003-06-24 21:54:15]: too few arguments > > So i guess that suexec can read the log and add text to it :) > > more info : > > ls -l /home > -rw-r--r-- 1 root root 7168 jun 24 20:03 aquota.group > -rw------- 1 root root 7168 jun 24 20:03 aquota.user > drwx--x--x 5 centre nobody 4096 jun 24 21:20 centre > -rw-r--r-- 1 root root 761 jun 19 04:30 convert > drwx--x--x 16 cybermds nobody 4096 jun 24 19:28 cybermds > -rw-r--r-- 1 root root 11163 jun 19 03:33 dns.dta > drwx--x--x 4 homeos nobody 4096 jun 24 20:23 homeos > drwx------ 2 root root 16384 jun 17 19:06 lost+found > -rw-r--r-- 1 root root 20 jun 19 01:35 password.pwd > drwx--x--x 5 wh37431 nobody 4096 jun 24 21:16 wh37431 > > ls -l /home/centre > -rw------- 1 root root 70196370 jun 19 04:01 backup.tar.gz > -rw-r--r-- 1 root root 28676 jun 24 21:55 > centre-dachats.com-access_log > -rw-r--r-- 1 root root 41845 jun 24 21:55 > centre-dachats.com-error_log > drwxr-xr-x 3 root root 4096 jun 19 04:04 home > drwxrws--- 31 centre apache 4096 jun 24 21:21 public_html > > ls -l /home/centre/public_html/cgi-bin > > drwxrws--- 4 centre apache 4096 jun 19 04:05 annonces > drwxrws--- 4 centre apache 4096 jun 19 04:05 archive > -rwxrwx--- 1 centre apache 1148 fév 16 18:31 bas.cgi > -rwxrwx--- 1 centre apache 1144 jan 24 2002 bas.cgi.bak > -rwxrwx--- 1 centre apache 51 avr 12 2002 call > -rwxrwx--- 1 centre apache 15102 mar 17 2001 cgi-lib.pl > -rwxrwx--- 1 centre apache 1304 fév 28 2001 chroniques.cgi > drwxrws--- 4 centre apache 4096 jun 19 04:05 comm > drwxrws--- 4 centre apache 4096 jun 19 04:05 concours > -rwxrwx--- 1 centre apache 3438 nov 6 2000 connect_txt.pl > -rwxrwx--- 1 centre apache 191 aoû 9 2000 > construction.cgi > -rwxrwx--- 1 centre apache 25540 mar 17 2001 cookie.lib > -rwxrwx--- 1 centre apache 8234 nov 6 2000 cookie-lib.pl > -rwxrwx--- 1 centre apache 7300 mai 31 15:32 core.dta > -rwxrwx--- 1 centre apache 898 mai 28 09:58 > cybermds_db.lib > -rwxrwx--- 1 centre apache 994 nov 18 2000 deces.cgi > drwxrws--- 3 centre apache 4096 jun 19 23:28 dta > drwxrws--- 3 centre apache 4096 jun 19 04:05 erreur > -rwxrwx--- 1 centre apache 1274 mai 24 2001 evenements.cgi > -rwxrwx--- 1 centre apache 2990 nov 17 2000 framer.cgi > -rwxrwx--- 1 centre apache 564 sep 19 2001 haut.cgi > drwxrws--- 8 centre apache 4096 jun 19 04:05 immobilier2 > drwxrws--- 5 centre apache 4096 jun 19 04:05 infomateriel > drwxrws--- 4 centre apache 4096 jun 19 04:05 liens > drwxrws--- 4 centre apache 4096 jun 19 04:05 meteo > -rwxrwx--- 1 centre apache 572 oct 14 2001 milieu.cgi > -rwxrwx--- 1 centre apache 332 avr 3 2001 milieu.cgi.bak > drwxrws--- 4 centre apache 4096 jun 19 04:05 ml > drwxrws--- 4 centre apache 4096 jun 19 04:05 naissances > drwxrws--- 4 centre apache 4096 jun 19 04:27 news > -rwxrwx--- 1 centre apache 1080 avr 13 2001 news.cgi > -rwxrwx--- 1 centre apache 1082 avr 13 2001 newsH.cgi > drwxrws--- 5 centre apache 4096 jun 19 04:05 projet1 > -rwxrwx--- 1 centre apache 136 mar 17 2001 pub.cgi > drwxrws--- 3 centre apache 4096 jun 19 04:05 quizz > -rwxrwx--- 1 centre apache 515 jun 17 16:08 > recherche_admin.cgi > -rwxrwx--- 1 centre apache 26157 déc 1 2001 recherche.cgi > -rwxrwx--- 1 centre apache 17 mar 5 2001 recherche.dta > -rwxrwx--- 1 centre apache 942 sep 19 2001 send_form.pl > drwxrws--- 4 centre apache 4096 jun 24 20:35 sondage > drwxrws--- 4 centre apache 4096 jun 19 04:05 > telechargements > -rwxrwx--- 1 centre apache 1184 avr 21 2001 test.cgi > drwxrws--- 2 centre apache 4096 jun 19 23:28 _vti_cnf > > > PS. running those script logged under user centre in telnet give me a > good result, no error, > > Thanks in advance for helping. -- David Efflandt - All spam ignored http://www.de-srv.com/ http://www.autox.chicago.il.us/ http://www.berniesfloral.net/ http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/ |
|
|||
|
but I suppose that Suexec will wrote in the log if the script is under the docroot.
efflandt@xnet.com (David Efflandt) wrote in message news:<slrnbfipgr.hto.efflandt@typhoon.xnet.com>... > On 24 Jun 2003, Mathieu Dumais-Savard <matdumsa@hotmail.com> wrote: > > Apache version : 2.0.46 > > Read the docs for SuExec. I have not used Apache 2, but generally virtual > host directoriess have to be below main DocumentRoot (or whatever suexec > was compiled for) in order to specify a user and group. SuExec typically > ONLY works in /home/username/public_html for a /~username/ URL. > > One way to get around that for ease of access from centre's home dir, is > to put the virtual host dir wherever the main htdocs dir is (owned by > centre and their group), and symlink that to their home dir as something > like www or html or centre. Then they will easily be able to access it > for maintenance from their home dir by the symlink name. > > If you do not want that vhost path to be accessible from the default or > other vhost paths (which could make script source visble from such path), > you could control that with a <Location "/centre"> section in main server > config. > > > setup: > > > > > ><VirtualHost *> > ><Directory /home/centre/public_html> > > Options +ExecCGI +Includes > > AddHandler cgi-script cgi pl > ></Directory> > > ServerAlias centre-dachats.com *.centre-dachats.com > > ServerAdmin centre@centre-dachats.com > > DocumentRoot /home/centre/public_html > > ServerName www.centre-dachats.com > > ErrorLog /home/centre/centre-dachats.com-error_log > > CustomLog /home/centre/centre-dachats.com-access_log common > > SuexecUserGroup centre apache > ></VirtualHost> > > > > > > users are in this way > > /home/user1 > > /home/user2 > > /home/user3 > > > > their website are in public_html folder > > /home/user1/public_html > > etc... > > > > I want them to be able to execute cgi everywhere in their public_html > > under their user with suexec... > > > > If i comment the line SuexecUserGroup centre apache everything work > > fine... if i put > > SuexecUserGroup centre apache it fail everywhere with a 500 telling > > premature end of script header in the apache log's... But nothing in > > the suexec log!!! > > > > When i run suexec from konsole logged as root, using > > cd /usr/local/apache2/bin > > ./suexec > > > > Suexec then write in my suexec.log : > > [2003-06-24 21:54:15]: too few arguments > > > > So i guess that suexec can read the log and add text to it :) > > > > more info : > > > > ls -l /home > > -rw-r--r-- 1 root root 7168 jun 24 20:03 aquota.group > > -rw------- 1 root root 7168 jun 24 20:03 aquota.user > > drwx--x--x 5 centre nobody 4096 jun 24 21:20 centre > > -rw-r--r-- 1 root root 761 jun 19 04:30 convert > > drwx--x--x 16 cybermds nobody 4096 jun 24 19:28 cybermds > > -rw-r--r-- 1 root root 11163 jun 19 03:33 dns.dta > > drwx--x--x 4 homeos nobody 4096 jun 24 20:23 homeos > > drwx------ 2 root root 16384 jun 17 19:06 lost+found > > -rw-r--r-- 1 root root 20 jun 19 01:35 password.pwd > > drwx--x--x 5 wh37431 nobody 4096 jun 24 21:16 wh37431 > > > > ls -l /home/centre > > -rw------- 1 root root 70196370 jun 19 04:01 backup.tar.gz > > -rw-r--r-- 1 root root 28676 jun 24 21:55 > > centre-dachats.com-access_log > > -rw-r--r-- 1 root root 41845 jun 24 21:55 > > centre-dachats.com-error_log > > drwxr-xr-x 3 root root 4096 jun 19 04:04 home > > drwxrws--- 31 centre apache 4096 jun 24 21:21 public_html > > > > ls -l /home/centre/public_html/cgi-bin > > > > drwxrws--- 4 centre apache 4096 jun 19 04:05 annonces > > drwxrws--- 4 centre apache 4096 jun 19 04:05 archive > > -rwxrwx--- 1 centre apache 1148 fév 16 18:31 bas.cgi > > -rwxrwx--- 1 centre apache 1144 jan 24 2002 bas.cgi.bak > > -rwxrwx--- 1 centre apache 51 avr 12 2002 call > > -rwxrwx--- 1 centre apache 15102 mar 17 2001 cgi-lib.pl > > -rwxrwx--- 1 centre apache 1304 fév 28 2001 chroniques.cgi > > drwxrws--- 4 centre apache 4096 jun 19 04:05 comm > > drwxrws--- 4 centre apache 4096 jun 19 04:05 concours > > -rwxrwx--- 1 centre apache 3438 nov 6 2000 connect_txt.pl > > -rwxrwx--- 1 centre apache 191 aoû 9 2000 > > construction.cgi > > -rwxrwx--- 1 centre apache 25540 mar 17 2001 cookie.lib > > -rwxrwx--- 1 centre apache 8234 nov 6 2000 cookie-lib.pl > > -rwxrwx--- 1 centre apache 7300 mai 31 15:32 core.dta > > -rwxrwx--- 1 centre apache 898 mai 28 09:58 > > cybermds_db.lib > > -rwxrwx--- 1 centre apache 994 nov 18 2000 deces.cgi > > drwxrws--- 3 centre apache 4096 jun 19 23:28 dta > > drwxrws--- 3 centre apache 4096 jun 19 04:05 erreur > > -rwxrwx--- 1 centre apache 1274 mai 24 2001 evenements.cgi > > -rwxrwx--- 1 centre apache 2990 nov 17 2000 framer.cgi > > -rwxrwx--- 1 centre apache 564 sep 19 2001 haut.cgi > > drwxrws--- 8 centre apache 4096 jun 19 04:05 immobilier2 > > drwxrws--- 5 centre apache 4096 jun 19 04:05 infomateriel > > drwxrws--- 4 centre apache 4096 jun 19 04:05 liens > > drwxrws--- 4 centre apache 4096 jun 19 04:05 meteo > > -rwxrwx--- 1 centre apache 572 oct 14 2001 milieu.cgi > > -rwxrwx--- 1 centre apache 332 avr 3 2001 milieu.cgi.bak > > drwxrws--- 4 centre apache 4096 jun 19 04:05 ml > > drwxrws--- 4 centre apache 4096 jun 19 04:05 naissances > > drwxrws--- 4 centre apache 4096 jun 19 04:27 news > > -rwxrwx--- 1 centre apache 1080 avr 13 2001 news.cgi > > -rwxrwx--- 1 centre apache 1082 avr 13 2001 newsH.cgi > > drwxrws--- 5 centre apache 4096 jun 19 04:05 projet1 > > -rwxrwx--- 1 centre apache 136 mar 17 2001 pub.cgi > > drwxrws--- 3 centre apache 4096 jun 19 04:05 quizz > > -rwxrwx--- 1 centre apache 515 jun 17 16:08 > > recherche_admin.cgi > > -rwxrwx--- 1 centre apache 26157 déc 1 2001 recherche.cgi > > -rwxrwx--- 1 centre apache 17 mar 5 2001 recherche.dta > > -rwxrwx--- 1 centre apache 942 sep 19 2001 send_form.pl > > drwxrws--- 4 centre apache 4096 jun 24 20:35 sondage > > drwxrws--- 4 centre apache 4096 jun 19 04:05 > > telechargements > > -rwxrwx--- 1 centre apache 1184 avr 21 2001 test.cgi > > drwxrws--- 2 centre apache 4096 jun 19 23:28 _vti_cnf > > > > > > PS. running those script logged under user centre in telnet give me a > > good result, no error, > > > > Thanks in advance for helping. |
| Thread Tools | |
| Display Modes | |
|
|