Service Temporarily Unavailable

17 posts / 0 new
Last post
#1 Wed, 04/11/2012 - 18:31
matedgo

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Where is problem. mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi this is showing like error, if i change from fcgid nothing work anymore, website is working but nothing else like login to forum and something like that ...

Wed, 04/11/2012 - 23:42
andreychek

Howdy,

Do you see any errors in your error logs when you're having the problems you described? Those are available in $HOME/logs/error_log.

-Eric

Thu, 04/12/2012 - 01:50
matedgo
[Thu Apr 12 08:09:10 2012] [warn] [client 180.76.5.94] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:11:49 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:14:10 2012] [error] [client 123.125.71.30] File does not exist: /home/crohq/public_html/robots.txt
[Thu Apr 12 08:14:16 2012] [error] [client 123.125.71.106] File does not exist: /home/crohq/public_html/robots.txt
[Thu Apr 12 08:15:23 2012] [warn] [client 66.249.71.166] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:17:26 2012] [warn] [client 66.249.71.166] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:18:36 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:22:58 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:24:11 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:27:22 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:27:44 2012] [warn] [client 180.76.5.53] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:31:44 2012] [warn] [client 66.249.71.166] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:34:37 2012] [warn] [client 66.249.71.166] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:37:12 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:37:21 2012] [warn] [client 123.125.71.28] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:38:03 2012] [warn] [client 220.181.108.88] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:38:26 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:40:16 2012] [warn] [client 66.249.66.92] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi
[Thu Apr 12 08:40:35 2012] [warn] [client 87.185.148.219] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi, referer: http://www.gamer-designs.de/index.php?site=forum_topic&topic=21656&type=ASC&page=1
[Thu Apr 12 08:42:19 2012] [warn] [client 218.86.50.218] mod_fcgid: can't apply process slot for /home/crohq/fcgi-bin/php5.fcgi

it just started from once.

Wed, 05/30/2012 - 20:40
hdavy2002

I have a similar issue. Here are my errors

[Wed May 30 17:49:58 2012] [error] [client 66.249.67.20] File does not exist: /home/lookkawa/public_html/modules [Thu May 31 01:10:55 2012] [error] [client 69.57.234.223] File does not exist: /home/lookkawa/public_html/favicon.ico [Thu May 31 01:12:01 2012] [warn] [client 69.57.234.223] mod_fcgid: can't apply process slot for /home/lookkawa/public_html/voipphone/admin/index.php, referer: http://lookkawa.com/voipphone/ [Thu May 31 01:12:01 2012] [error] [client 69.57.234.223] File does not exist: /home/lookkawa/public_html/favicon.ico [Thu May 31 01:13:04 2012] [error] [client 69.57.234.223] File does not exist: /home/lookkawa/public_html/favicon.ico [Thu May 31 01:14:09 2012] [warn] [client 69.57.234.223] mod_fcgid: can't apply process slot for /home/lookkawa/public_html/voipphone/panel/index.php, referer: http://lookkawa.com/voipphone/ [Thu May 31 01:14:10 2012] [error] [client 69.57.234.223] File does not exist: /home/lookkawa/public_html/favicon.ico [Thu May 31 01:22:01 2012] [error] [client 69.57.234.223] File does not exist: /home/lookkawa/public_html/favicon.ico [Thu May 31 01:23:06 2012] [warn] [client 69.57.234.223] mod_fcgid: can't apply process slot for /home/lookkawa/public_html/voipphone/admin/index.php, referer: http://lookkawa.com/voipphone/ [Thu May 31 01:23:06 2012] [error] [client 69.57.234.223] File does not exist: /home/lookkawa/public_html/favicon.ico [Thu May 31 01:26:52 2012] [warn] [client 69.57.234.223] mod_fcgid: can't apply process slot for /home/lookkawa/public_html/voipphone/ admin/index.php

Any suggestions ??

Wed, 05/30/2012 - 22:19
andreychek

Howdy,

If you change your PHP Execution Mode to CGI (which you can do in Server Configuration -> Website Options), what error (if any) do you see in your logs when trying to access your site?

-Eric

Thu, 05/31/2012 - 05:51
hdavy2002

I am getting

May 31 10:45:01 2012] [crit] [client 69.57.234.223] (13)Permission denied: /home/lookkawa/cgi-bin/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable, referer: http://lookkawa.com/voipphone/

On the website I am getting 403 Forbidden, You don't have permission to access /cgi-bin/php5.cgi/voipphone/admin/index.php on this server.

Seems like a permission issue, any advice on what permission to set and where?

Thanks

Thu, 05/31/2012 - 06:01
hdavy2002

i also see no .htaccess in cgi-bin

see below the places i went

root@server:~# chmod -R 755 /home/lookkawa/public_html/voipphone/ root@server:~# ls -la /home/lookkawa/public_html/voipphone/ total 48 drwxr-xr-x 8 root root 4096 May 31 01:10 . drwxr-xr-x 4 lookkawa lookkawa 4096 May 31 01:08 .. drwxr-xr-x 2 root root 4096 May 31 01:10 _asterisk drwxr-xr-x 8 root root 4096 May 31 01:10 admin drwxr-xr-x 2 root root 4096 May 31 01:10 asterisk -rwxr-xr-x 1 root root 602 May 31 01:10 index.html -rwxr-xr-x 1 root root 4542 May 31 01:10 mainstyle.css drwxr-xr-x 6 root root 4096 May 31 01:10 panel drwxr-xr-x 7 root root 4096 May 31 01:10 recordings -rwxr-xr-x 1 root root 361 May 31 01:10 robots.txt lrwxrwxrwx 1 root root 5 May 31 01:10 voip -> voip/ drwxr-xr-x 2 root root 4096 May 31 01:10 webalizer root@server:~# ls -la /home/lookkawa/public_html/voipphone/panel/ total 600 drwxr-xr-x 6 root root 4096 May 31 01:10 . drwxr-xr-x 8 root root 4096 May 31 01:10 .. -rwxr-xr-x 1 root root 36440 May 31 01:10 CHANGES -rwxr-xr-x 1 root root 2449 May 31 01:10 FAQ -rwxr-xr-x 1 root root 7421 May 31 01:10 README -rwxr-xr-x 1 root root 2521 May 31 01:10 RECIPES -rwxr-xr-x 1 root root 241 May 31 01:10 TODO -rwxr-xr-x 1 root root 20245 May 31 01:10 UPGRADE drwxr-xr-x 5 root root 4096 May 31 01:10 dhtml -rwxr-xr-x 1 root root 706 May 31 01:10 extensions.conf.sample drwxr-xr-x 2 root root 4096 May 31 01:10 flash -rwxr-xr-x 1 root root 1715 May 31 01:10 index.php -rwxr-xr-x 1 root root 1803 May 31 01:10 index_amp.php drwxr-xr-x 2 root root 4096 May 31 01:10 init drwxr-xr-x 2 root root 4096 May 31 01:10 ming-source -rwxr-xr-x 1 root root 1240 May 31 01:10 op_astdb.cfg -rwxr-xr-x 1 root root 113 May 31 01:10 op_buttons.cfg -rwxr-xr-x 1 root root 1587 May 31 01:10 op_buttons_additional.cfg -rwxr-xr-x 1 root root 968 May 31 01:10 op_lang_ca.cfg -rwxr-xr-x 1 root root 965 May 31 01:10 op_lang_de.cfg -rwxr-xr-x 1 root root 921 May 31 01:10 op_lang_en.cfg -rwxr-xr-x 1 root root 983 May 31 01:10 op_lang_es.cfg -rwxr-xr-x 1 root root 1087 May 31 01:10 op_lang_fr.cfg -rwxr-xr-x 1 root root 1055 May 31 01:10 op_lang_gl.cfg -rwxr-xr-x 1 root root 1040 May 31 01:10 op_lang_it.cfg -rwxr-xr-x 1 root root 937 May 31 01:10 op_lang_no.cfg -rwxr-xr-x 1 root root 1353 May 31 01:10 op_lang_ru.cfg -rwxr-xr-x 1 root root 1030 May 31 01:10 op_lang_se.cfg -rwxr-xr-x 1 root root 7950 May 31 01:10 op_server.cfg -rwxr-xr-x 1 root root 419299 May 31 01:10 op_server.pl -rwxr-xr-x 1 root root 2607 May 31 01:10 op_style.cfg -rwxr-xr-x 1 root root 93 May 31 01:10 safe_opserver -rwxr-xr-x 1 root root 2817 May 31 01:10 variables.txt root@server:~# cd . root@server:~# cd /home/lookkawa/public_html/ root@server:/home/lookkawa/public_html# ls -la total 20 drwxr-xr-x 4 lookkawa lookkawa 4096 May 31 01:08 . drwxr-xr-x 12 lookkawa lookkawa 4096 May 30 03:53 .. lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 awstats-icon -> /usr/share/aws tats/icon lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 awstatsicons -> /usr/share/aws tats/icon lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 icon -> /usr/share/awstats/ico n -rwxr-xr-x 1 root root 29 May 30 12:55 index.html drwxr-xr-x 2 lookkawa lookkawa 4096 May 30 03:41 stats drwxr-xr-x 8 root root 4096 May 31 01:10 voipphone root@server:/home/lookkawa/public_html# chown -R lookkawa:lookkawa voipphone/ root@server:/home/lookkawa/public_html# ls -la total 20 drwxr-xr-x 4 lookkawa lookkawa 4096 May 31 01:08 . drwxr-xr-x 12 lookkawa lookkawa 4096 May 30 03:53 .. lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 awstats-icon -> /usr/share/aws tats/icon lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 awstatsicons -> /usr/share/aws tats/icon lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 icon -> /usr/share/awstats/ico n -rwxr-xr-x 1 root root 29 May 30 12:55 index.html drwxr-xr-x 2 lookkawa lookkawa 4096 May 30 03:41 stats drwxr-xr-x 8 lookkawa lookkawa 4096 May 31 01:10 voipphone root@server:/home/lookkawa/public_html# cd voipphone/ root@server:/home/lookkawa/public_html/voipphone# ls -la total 48 drwxr-xr-x 8 lookkawa lookkawa 4096 May 31 01:10 . drwxr-xr-x 4 lookkawa lookkawa 4096 May 31 01:08 .. drwxr-xr-x 2 lookkawa lookkawa 4096 May 31 01:10 _asterisk drwxr-xr-x 8 lookkawa lookkawa 4096 May 31 01:10 admin drwxr-xr-x 2 lookkawa lookkawa 4096 May 31 01:10 asterisk -rwxr-xr-x 1 lookkawa lookkawa 602 May 31 01:10 index.html -rwxr-xr-x 1 lookkawa lookkawa 4542 May 31 01:10 mainstyle.css drwxr-xr-x 6 lookkawa lookkawa 4096 May 31 01:10 panel drwxr-xr-x 7 lookkawa lookkawa 4096 May 31 01:10 recordings -rwxr-xr-x 1 lookkawa lookkawa 361 May 31 01:10 robots.txt lrwxrwxrwx 1 lookkawa lookkawa 5 May 31 01:10 voip -> voip/ drwxr-xr-x 2 lookkawa lookkawa 4096 May 31 01:10 webalizer root@server:/home/lookkawa/public_html/voipphone# cd .. root@server:/home/lookkawa/public_html# ls awstats-icon awstatsicons icon index.html stats voipphone root@server:/home/lookkawa/public_html# cd .. root@server:/home/lookkawa# ls awstats etc homes public_html ssl.key tmp cgi-bin fcgi-bin logs ssl.cert svn root@server:/home/lookkawa# ls -la total 76 drwxr-xr-x 12 lookkawa lookkawa 4096 May 30 03:53 . drwxr-xr-x 6 root root 4096 May 30 02:50 .. -rw-r--r-- 1 lookkawa lookkawa 23 May 30 02:43 .awstats-htpasswd -rw-r--r-- 1 lookkawa lookkawa 220 May 30 02:43 .bash_logout -rw-r--r-- 1 lookkawa lookkawa 3103 May 30 02:43 .bashrc -rw-r--r-- 1 root root 0 May 30 12:23 .htaccess -rw-r--r-- 1 lookkawa lookkawa 675 May 30 02:43 .profile -rw-r--r-- 1 lookkawa lookkawa 23 May 30 02:43 .stats-htpasswd drwx------ 3 lookkawa lookkawa 4096 May 30 02:43 .usermin drwxr-xr-x 2 lookkawa lookkawa 4096 May 31 03:13 awstats drwxr-x--- 2 lookkawa lookkawa 4096 May 31 10:30 cgi-bin drwxr-xr-x 3 lookkawa lookkawa 4096 May 30 02:43 etc drwxr-xr-x 2 lookkawa lookkawa 4096 May 31 10:30 fcgi-bin drwxr-xr-x 2 lookkawa lookkawa 4096 May 30 02:43 homes drwxr-x--- 2 lookkawa lookkawa 4096 May 30 02:43 logs drwxr-xr-x 4 lookkawa lookkawa 4096 May 31 01:08 public_html -rwx------ 1 lookkawa lookkawa 1330 May 30 02:43 ssl.cert -rwx------ 1 lookkawa lookkawa 1679 May 30 02:43 ssl.key drwxr-sr-x 2 lookkawa lookkawa 4096 May 30 02:43 svn drwxr-x--- 2 lookkawa lookkawa 4096 May 30 02:43 tmp root@server:/home/lookkawa# chmod -R 755 cgi-bin/ chmod: changing permissions of `cgi-bin/php5.cgi': Operation not permitted root@server:/home/lookkawa# cat www/cgi-bin/.htaccess cat: www/cgi-bin/.htaccess: No such file or directory root@server:/home/lookkawa# cat cgi-bin/.htaccess cat: cgi-bin/.htaccess: No such file or directory root@server:/home/lookkawa# ls awstats etc homes public_html ssl.key tmp cgi-bin fcgi-bin logs ssl.cert svn root@server:/home/lookkawa# cd cgi-bin/ root@server:/home/lookkawa/cgi-bin# ls awstats.pl lang lib php5.cgi plugins root@server:/home/lookkawa/cgi-bin# ls -la total 16 drwxr-xr-x 2 lookkawa lookkawa 4096 May 31 10:30 . drwxr-xr-x 12 lookkawa lookkawa 4096 May 30 03:53 .. -rwxr-xr-x 1 lookkawa lookkawa 43 May 30 02:43 awstats.pl lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 lang -> /usr/share/awstats/lan g lrwxrwxrwx 1 lookkawa lookkawa 22 May 30 02:43 lib -> /usr/share/awstats/lib -rwxr-xr-x 1 lookkawa lookkawa 147 May 31 10:30 php5.cgi lrwxrwxrwx 1 lookkawa lookkawa 26 May 30 02:43 plugins -> /usr/share/awstats/ plugins root@server:/home/lookkawa/cgi-bin# ls -la /var/www/ total 44 drwxr-xr-x 7 asterisk asterisk 4096 May 31 01:35 . drwxr-xr-x 16 root root 4096 May 30 00:07 .. drwxr-xr-x 2 asterisk asterisk 4096 May 30 03:30 _asterisk drwxr-xr-x 8 asterisk asterisk 4096 May 30 03:30 admin -rwxr-xr-x 1 asterisk asterisk 602 May 30 03:30 index.html -rwxr-xr-x 1 root root 4542 May 30 03:30 mainstyle.css drwxr-xr-x 6 asterisk asterisk 4096 May 30 03:32 panel drwxr-xr-x 7 asterisk asterisk 4096 May 30 03:30 recordings -rwxr-xr-x 1 root root 361 May 30 03:30 robots.txt lrwxrwxrwx 1 root root 5 May 30 18:56 voip -> voip/ drwxr-xr-x 2 asterisk asterisk 4096 May 30 00:07 webalizer root@server:/home/lookkawa/cgi-bin# ls awstats.pl lang lib php5.cgi plugins root@server:/home/lookkawa/cgi-bin# ls -la total 16 drwxr-xr-x 2 lookkawa lookkawa 4096 May 31 10:30 . drwxr-xr-x 12 lookkawa lookkawa 4096 May 30 03:53 .. -rwxr-xr-x 1 lookkawa lookkawa 43 May 30 02:43 awstats.pl lrwxrwxrwx 1 lookkawa lookkawa 23 May 30 02:43 lang -> /usr/share/awstats/lan g lrwxrwxrwx 1 lookkawa lookkawa 22 May 30 02:43 lib -> /usr/share/awstats/lib -rwxr-xr-x 1 lookkawa lookkawa 147 May 31 10:30 php5.cgi lrwxrwxrwx 1 lookkawa lookkawa 26 May 30 02:43 plugins -> /usr/share/awstats/ plugins root@server:/home/lookkawa/cgi-bin# ls -a . .. awstats.pl lang lib php5.cgi plugins root@server:/home/lookkawa/cgi-bin#

Thu, 05/31/2012 - 06:02
hdavy2002

sorry for the mess up. Have no idea on how to add code like the guy above

Thu, 05/31/2012 - 06:19
ronald
ronald's picture

You can add the code tag: [ code ] text here [/ code ]

Permission denied: /home/lookkawa/cgi-bin/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

You need to chmod your folders to 0755, this can also be set in your server template under Apache Website for future domains.

Also you need to make sure the folders and files belong to the correct owner and not to root, e.g lookkawa.

Thu, 05/31/2012 - 15:36
hdavy2002

I did as you suggested with the permission.

Here are my last 20 errors.

 
[Thu May 31 17:24:55 2012] [error] [client 76.76.179.184] File does not exist: /home/lookkawa/public_html/voipphne
[Thu May 31 17:24:56 2012] [error] [client 76.76.179.184] File does not exist: /home/lookkawa/public_html/favicon.ico
[Thu May 31 17:25:03 2012] [error] [client 76.76.179.184] File does not exist: /home/lookkawa/public_html/favicon.ico
[Thu May 31 17:25:06 2012] [error] [client 76.76.179.184] suexec policy violation: see suexec log for more details, referer: http://lookkawa.com/voipphone/
[Thu May 31 17:25:06 2012] [error] [client 76.76.179.184] Premature end of script headers: php5.cgi, referer: http://lookkawa.com/voipphone/
[Thu May 31 18:10:05 2012] [error] [client 66.249.73.20] File does not exist: /home/lookkawa/public_html/robots.txt
[Thu May 31 18:10:05 2012] [error] [client 66.249.73.20] File does not exist: /home/lookkawa/public_html/modules
[Thu May 31 18:22:17 2012] [error] [client 76.76.179.184] File does not exist: /home/lookkawa/public_html/favicon.ico
[Thu May 31 18:22:18 2012] [error] [client 76.76.179.184] suexec policy violation: see suexec log for more details, referer: http://lookkawa.com/voipphone/
[Thu May 31 18:22:18 2012] [error] [client 76.76.179.184] Premature end of script headers: php5.cgi, referer: http://lookkawa.com/voipphone/
[Thu May 31 18:22:19 2012] [error] [client 76.76.179.184] File does not exist: /home/lookkawa/public_html/favicon.ico
[Thu May 31 18:30:23 2012] [error] [client 66.249.73.20] File does not exist: /home/lookkawa/public_html/modules
[Thu May 31 19:05:28 2012] [error] [client 66.249.73.20] File does not exist: /home/lookkawa/public_html/modules
[Thu May 31 19:23:24 2012] [error] [client 66.249.73.20] File does not exist: /home/lookkawa/public_html/modules
[Thu May 31 19:57:41 2012] [error] [client 66.249.73.20] File does not exist: /home/lookkawa/public_html/modules
[Thu May 31 19:58:03 2012] [error] [client 95.108.151.244] File does not exist: /home/lookkawa/public_html/robots.txt
[Thu May 31 20:32:14 2012] [error] [client 76.76.176.18] File does not exist: /home/lookkawa/public_html/favicon.ico
[Thu May 31 20:32:18 2012] [error] [client 76.76.176.18] suexec policy violation: see suexec log for more details, referer: http://lookkawa.com/voipphone/
[Thu May 31 20:32:18 2012] [error] [client 76.76.176.18] Premature end of script headers: php5.cgi, referer: http://lookkawa.com/voipphone/
[Thu May 31 20:32:18 2012] [error] [client 76.76.176.18] File does not exist: /home/lookkawa/public_html/favicon.ico
Thu, 05/31/2012 - 16:16
andreychek

Howdy,

I see a suexec policy violation error in there.

Can you go into your public_html folder, and run this command:

ls -la voipphone/index*

That should show the ownership and permission of your index files.

-Eric

Thu, 05/31/2012 - 18:23
hdavy2002

Here the output with a little more stuff as I played around. Suexec was interesting as it said "user asterisk not allowed" .

I had copied this folder voipphone from /var/www to /home/lookkawa/public_html

The reason was that after I created multiple virtual servers, the default server became lookkawa.com and it was pulling data from /home/lookkawa/public_html

I had intalled Asterisk and the article I was following created files in /var/www Since my external IP was taking me to /home/lookkawa/public_html. I thought, let me copy this folder into /home/lookkawa/public_html

If I go to http://lookkawa.com/voipphone I can see the index page. However, when I click on a link that's when it gets messed up.

Thanks for all your help. I am still learning linux.

Cheers

login as: root
root@184.82.92.171's password:
Linux server.davy.in 2.6.32-37-generic-pae #81-Ubuntu SMP Fri Dec 2 22:24:22 UTC                                                                                         2011 i686 GNU/Linux
Ubuntu 10.04.3 LTS
 
Welcome to Ubuntu!
 * Documentation:  https://help.ubuntu.com/
Last login: Thu May 31 12:47:30 2012 from adsl-76-76-179-184.bras.anguillanet.co                                                                                        m
root@server:~# cd /home/lookkawa/public_html/voipphone/
root@server:/home/lookkawa/public_html/voipphone# ls -la index*
-rwxr-xr-x 1 asterisk asterisk 602 May 31 01:10 index.html
root@server:/home/lookkawa/public_html/voipphone# la -la
total 48
drwxr-xr-x 8 asterisk asterisk 4096 May 31 01:10 .
drwxr-xr-x 4 lookkawa lookkawa 4096 May 31 01:08 ..
drwxr-xr-x 2 asterisk asterisk 4096 May 31 01:10 _asterisk
drwxr-xr-x 8 asterisk asterisk 4096 May 31 01:10 admin
drwxr-xr-x 2 asterisk asterisk 4096 May 31 01:10 asterisk
-rwxr-xr-x 1 asterisk asterisk  602 May 31 01:10 index.html
-rwxr-xr-x 1 asterisk asterisk 4542 May 31 01:10 mainstyle.css
drwxr-xr-x 6 asterisk asterisk 4096 May 31 01:10 panel
drwxr-xr-x 7 asterisk asterisk 4096 May 31 01:10 recordings
-rwxr-xr-x 1 asterisk asterisk  361 May 31 01:10 robots.txt
lrwxrwxrwx 1 asterisk asterisk    5 May 31 01:10 voip -> voip/
drwxr-xr-x 2 asterisk asterisk 4096 May 31 01:10 webalizer
root@server:/home/lookkawa/public_html/voipphone# cd /usr/sbin/suexec
-bash: cd: /usr/sbin/suexec: No such file or directory
root@server:/home/lookkawa/public_html/voipphone# tail -n 20 /var/log/apache2/su                                                                                        exec.log
[2012-05-31 12:55:15]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 12:55:18]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 12:58:49]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 13:01:31]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 13:31:53]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 13:31:58]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 17:25:06]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 18:22:18]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 20:32:18]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 20:59:57]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 21:07:37]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
[2012-05-31 21:13:55]: User asterisk not allowed: Could not open config file /et                                                                                        c/apache2/suexec/asterisk
root@server:/home/lookkawa/public_html/voipphone# ^C
root@server:/home/lookkawa/public_html/voipphone# la -la /et                                                                                        c/apache2/suexec/asterisk
ls: cannot access /et: No such file or directory
ls: cannot access c/apache2/suexec/asterisk: No such file or directory
root@server:/home/lookkawa/public_html/voipphone# la -la /etc/apache2/suexec/                                                                                           total 12
drwxr-xr-x 2 root root 4096 May 30 00:36 .
drwxr-xr-x 8 root root 4096 May 31 10:30 ..
-rw-r--r-- 1 root root  254 May 30 00:36 www-data
root@server:/home/lookkawa/public_html/voipphone# la -la /etc/apache2/
total 96
drwxr-xr-x  8 root root  4096 May 31 10:30 .
drwxr-xr-x 99 root root  4096 May 31 10:30 ..
-rw-r--r--  1 root root  8159 May 30 03:23 apache2.conf
-rw-r--r--  1 root root  8180 May 30 03:23 apache2.conf_orig
drwxr-xr-x  2 root root  4096 May 30 00:08 conf.d
-rw-r--r--  1 root root   725 Nov  3  2011 envvars
-rw-r--r--  1 root root     0 Jan 16 15:41 httpd.conf
-rw-r--r--  1 root root 31063 Nov  3  2011 magic
drwxr-xr-x  2 root root 12288 May 30 00:36 mods-available
drwxr-xr-x  2 root root  4096 May 30 00:36 mods-enabled
-rw-r--r--  1 root root    21 May 30 00:36 ports.conf
drwxr-xr-x  2 root root  4096 May 31 10:30 sites-available
drwxr-xr-x  2 root root  4096 May 30 02:50 sites-enabled
drwxr-xr-x  2 root root  4096 May 30 00:36 suexec
root@server:/home/lookkawa/public_html/voipphone# ^C
root@server:/home/lookkawa/public_html/voipphone# cd ..
root@server:/home/lookkawa/public_html# ls -la
total 20
drwxr-xr-x  4 lookkawa lookkawa 4096 May 31 01:08 .
drwxr-xr-x 12 lookkawa lookkawa 4096 May 30 03:53 ..
lrwxrwxrwx  1 lookkawa lookkawa   23 May 30 02:43 awstats-icon -> /usr/share/awstats/icon
lrwxrwxrwx  1 lookkawa lookkawa   23 May 30 02:43 awstatsicons -> /usr/share/awstats/icon
lrwxrwxrwx  1 lookkawa lookkawa   23 May 30 02:43 icon -> /usr/share/awstats/icon
-rwxr-xr-x  1 root     root       29 May 30 12:55 index.html
drwxr-xr-x  2 lookkawa lookkawa 4096 May 30 03:41 stats
drwxr-xr-x  8 asterisk asterisk 4096 May 31 01:10 voipphone
Thu, 05/31/2012 - 22:22
andreychek

Ah, chances are that when you copied the files from /var/www, they were set as an invalid userid for that particular domain.

Ideally, you'd want all the files within your public_html folder to be owned by your Virtual Server owner.

You can do that by cd'ing into /home/lookkawa, and running this command:

chown -R lookkawa:lookkawa public_html

That will take everything in your public_html folder, and set the owner and group to lookkawa.

-Eric

Fri, 06/01/2012 - 06:47
hdavy2002

Thanks Andreychek.

I came across this thread http://www.webmasterworld.com/apache/4375270.htm and changed mode to mod_php (run as Apache's user)

It's working great now. phew!!

Thanks all who helped me. Much appreciated.

Cheers

Fri, 06/01/2012 - 08:32
ronald
ronald's picture

mod_php is not the solution, it is a bad choice of a workaround.
the solution is to chown the files to the correct owner (as I said in my prevoius post right away) so you learn to do things the correct way while learning how to read/interpret logfiles and how to limit unauthorised acces to your machine at the same time.

Although mod_php is fully legitimate, it is the most insecure way of running websites especially in a shared hosting environment, not only in my opninion.

you see that lookkawa was not able to execute files belonging to asterisk and that is exactly how the world should be.
Now with mod_php it doesnt matter anymore as Apache can run any script from anyone. It owns all and it can be owned by the wrong people too. Scared? :D

Fri, 06/01/2012 - 10:50
hdavy2002

Thanks you have a point. I will do as advised and get back. Thanks again for the good advice, makes complete sense now.

Cheers

Fri, 06/01/2012 - 13:46
andreychek

Also, note that Jamie just added a feature to Virtualmin that fixes directory permissions like you're seeing.

So, if you don't like the chown commands -- you can fix that from within Virtualmin by going into Limits and Validation -> Validate Virtual Servers -> Fix Permissions. From there, you can correct the file permissions of one or more Virtual Servers.

-Eric

Topic locked