After syslogd retarted, Apache started logging Permission denied errors. Nothing has changed on the box. Permissions are 755 across the board and config file hasn't changed. I even set permissions to 777 on all folders leading to the web folder and restarted httpd. SElinux disabled. CentOS release 5.7. Any ideas?
[user#host log]$ sudo cat messages
Jun 23 04:02:55 systools syslogd 1.4.1: restart.
[user#host log]$ head /etc/httpd/logs/error_log
[Sun Jun 23 04:03:02 2013] [notice] Digest: generating secret for digest authentication ...
[Sun Jun 23 04:03:02 2013] [notice] Digest: done
[Sun Jun 23 04:03:04 2013] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sun Jun 23 04:03:05 2013] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Sun Jun 23 04:04:16 2013] [error] [client 192.168.1.190] (13)Permission denied: access to /incident/rss.php denied
[Sun Jun 23 04:09:14 2013] [error] [client 192.168.1.190] (13)Permission denied: access to /incident/rss.php denied
[Sun Jun 23 04:14:14 2013] [error] [client 192.168.1.190] (13)Permission denied: access to /incident/rss.php denied
[Sun Jun 23 04:19:15 2013] [error] [client 192.168.1.190] (13)Permission denied: access to /incident/rss.php denied
[Sun Jun 23 04:24:16 2013] [error] [client 192.168.1.190] (13)Permission denied: access to /incident/rss.php denied
Forbidden
You don't have permission to access / on this server.
Apache/2.2.3 (CentOS) Server at systools.corp.webex.com Port 80
Changed permissions of files and restarted httpd.
find /var/www -type d -exec chmod 775 {} \; find /var/www -type f -exec chmod 664 {} \; /etc/init.d/http restart
Related
I'm really frustrated, my apache server doesn't start, my error.log is this:
[Fri Jul 26 16:26:20.211050 2013] [core:notice] [pid 32240:tid 268] AH00094: Command line: 'c:\\users\\mrvisiont\\desktop\\xampp\\apache\\bin\\httpd.exe -d C:/Users/MrViSiOnT/Desktop/xampp/apache'
[Fri Jul 26 16:26:20.213050 2013] [mpm_winnt:notice] [pid 32240:tid 268] AH00418: Parent: Created child process 32112
[Fri Jul 26 16:26:20.225050 2013] [:crit] [pid 32112] (-2146173818)Unknown error: AH00141: Could not initialize random number generator
[Fri Jul 26 16:26:20.227051 2013] [mpm_winnt:crit] [pid 32240:tid 268] AH00419: master_main: create child process failed. Exiting.
I don't know what is the meaning of "Could not initialize random number generator"
Anybody knows what is the issue????
EDIT:
When I run httpd.exe, error.log is:
[Fri Jul 26 16:52:31 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Jul 26 16:52:31 2013] [notice] Digest: done
[Fri Jul 26 16:52:31 2013] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 configured -- resuming normal operations
[Fri Jul 26 16:52:31 2013] [notice] Server built: Sep 10 2011 11:34:11
[Fri Jul 26 16:52:31 2013] [notice] Parent: Created child process 16760
no listening sockets available, shutting down
Unable to open logs
[Fri Jul 26 16:52:31 2013] [crit] (OS 87)El parámetro no es correcto. : master_main: create child process failed. Exiting.
EDIT (FYI): Thank you people!
When I comment ServerName line from httpd.conf... error.log is:
httpd.exe: Could not reliably determine the server's fully qualified domain name, using fe80::8e3:cc40:2151:c412 for ServerName
[Fri Jul 26 17:03:11 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Jul 26 17:03:11 2013] [notice] Digest: done
[Fri Jul 26 17:03:12 2013] [notice] Apache/2.2.21 (Win32) mod_ssl/2.2.21 OpenSSL/1.0.0e PHP/5.3.8 configured -- resuming normal operations
[Fri Jul 26 17:03:12 2013] [notice] Server built: Sep 10 2011 11:34:11
[Fri Jul 26 17:03:12 2013] [notice] Parent: Created child process 13816
httpd.exe: apr_sockaddr_info_get() failed for MRVISIONT-PC
httpd.exe: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
no listening sockets available, shutting down
Unable to open logs
[Fri Jul 26 17:03:12 2013] [crit] (OS 6)Controlador no válido. : master_main: create child process failed. Exiting.
I had similar problem and troubleshooted for days before I finally stumbled upon the solution:
Ensure that your system's PATH environment variable does not contain illegal characters such as "b?????Ä/????????".
Removing such entries resolved the problem for me.
I had a similar problem:
[:crit] [pid 7368] (-2146173818)Unknown error: AH00141: Could not initialize random number generator
I checked the system's PATH environment variable and found Chinese signs in it.
Since I deleted them, Apache works fine.
Check your environment settings. There may be an invalid character in it. See http://www.apachelounge.com/viewtopic.php?t=5535
Besides that: it looks like you are missing the logs directory.
I ran into this issue today for a completely different reason: No PATH environment variable (at all).
The environment variable hint put me on the right track. Dumping environment vars via a test application instead of starting Apache revealed the underlying issue. The Windows CreateProcess() API is generally difficult to work with.
Please help.
I've been trying to configure FastCGI + php-fpm on CentOS 6.4.
Finally it's working, but there are some errors at Apache log. I'd like to understand them and get rid of them.
Here's what I did after fresh install of CentOS (minimal) + MySQL + Apache2 + PHP:
# echo "" > /var/log/httpd/error_log
# service httpd restart
# cat /var/log/httpd/error_log
[Fri Apr 26 05:06:49 2013] [notice] caught SIGTERM, shutting down
[Fri Apr 26 05:06:50 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Apr 26 05:06:50 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Apr 26 05:06:50 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 26 05:06:50 2013] [notice] Digest: done
[Fri Apr 26 05:06:50 2013] [notice] Apache/2.2.15 (Unix) DAV/2 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
# yum -y install php-fpm
# chkconfig --levels 235 php-fpm on
# service php-fpm start
# /etc/init.d/php-fpm status
php-fpm (pid 1644) running...
# cat /var/log/php-fpm/error.log
[26-Apr-2013 05:07:17] NOTICE: fpm is running, pid 1644
[26-Apr-2013 05:07:17] NOTICE: ready to handle connections
# yum -y install wget make gcc libtool httpd-devel apr-devel apr
# wget http://www.fastcgi.com/dist/mod_fastcgi-current.tar.gz
# tar xf mod_fastcgi-current.tar.gz
# cd mod_fastcgi-2.4.6
# make -f Makefile.AP2 top_dir=/usr/lib/httpd
# cp .libs/mod_fastcgi.so /usr/lib/httpd/modules/
# mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.disabled
# mkdir /var/www/fastcgi
# cat > /etc/httpd/conf.d/fastcgi.conf <<EOF
# LoadModule fastcgi_module modules/mod_fastcgi.so
# FastCgiWrapper Off
# DirectoryIndex index.php index.html index.shtml index.cgi
# Alias /phpfpm /var/www/fastcgi/phpfpm
# AddType application/x-httpd-php .php
# Action application/x-httpd-php /phpfpm
# FastCgiExternalServer /var/www/fastcgi/phpfpm -host 127.0.0.1:9000 -flush -pass-header Authorization
# EOF
# setsebool httpd_can_network_connect on
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Fri Apr 26 05:07:33 2013] [notice] caught SIGTERM, shutting down
[Fri Apr 26 05:07:34 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Apr 26 05:07:34 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Apr 26 05:07:34 2013] [error] (13)Permission denied: FastCGI: apr_dir_open() failed
[Fri Apr 26 05:07:34 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 26 05:07:34 2013] [notice] Digest: done
[Fri Apr 26 05:07:34 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:07:34 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:07:34 2013] [notice] FastCGI: process manager initialized (pid 1841)
[Fri Apr 26 05:07:34 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Fri Apr 26 05:10:05 2013] [notice] caught SIGTERM, shutting down
[Fri Apr 26 05:10:05 2013] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Fri Apr 26 05:10:05 2013] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Apr 26 05:10:05 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [notice] Digest: generating secret for digest authentication ...
[Fri Apr 26 05:10:05 2013] [notice] Digest: done
[Fri Apr 26 05:10:05 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Fri Apr 26 05:10:05 2013] [notice] FastCGI: process manager initialized (pid 1866)
[Fri Apr 26 05:10:05 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
UPD:
I completely disabled SELinux (setenforce 0 and SELINUX=disabled in /etc/sysconfig/selinux) and I also disabled suEXEC (mv /usr/sbin/suexec /usr/sbin/suexec.disabled and chmod 600 /usr/sbin/suexec.disabled). Here's what I got:
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Tue Apr 30 12:02:52 2013] [notice] caught SIGTERM, shutting down
[Tue Apr 30 12:02:53 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 30 12:02:53 2013] [notice] Digest: done
[Tue Apr 30 12:02:53 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [error] FastCGI: can't create dynamic directory "/etc/httpd/logs/fastcgi/dynamic": access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:02:53 2013] [notice] FastCGI: process manager initialized (pid 1769)
[Tue Apr 30 12:02:53 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
Same errors.
# ls -ld /etc/httpd/logs/fastcgi/dynamic
drwx------. 2 apache apache 4096 Apr 26 05:07 /etc/httpd/logs/fastcgi/dynamic
# chmod 777 /etc/httpd/logs/fastcgi/dynamic
# echo "" > /var/log/httpd/error_log
# service httpd restart
# sleep 5
# cat /var/log/httpd/error_log
[Tue Apr 30 12:18:44 2013] [notice] caught SIGTERM, shutting down
[Tue Apr 30 12:18:44 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:18:44 2013] [notice] Digest: generating secret for digest authentication ...
[Tue Apr 30 12:18:44 2013] [notice] Digest: done
[Tue Apr 30 12:18:44 2013] [error] FastCGI: access for server (uid -1, gid -1) failed: read not allowed
[Tue Apr 30 12:18:44 2013] [notice] FastCGI: process manager initialized (pid 1888)
[Tue Apr 30 12:18:44 2013] [notice] Apache/2.2.15 (Unix) DAV/2 mod_fastcgi/2.4.6 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations
Still some errors. Any thoughts?
Thanks for your attention.
Best regards, Anton Kizernis.
You did
# chmod 777 /etc/httpd/logs/fastcgi/dynamic
But don't you need to set the readable bit for the grandparent directory, and make the parent directory writable? E.g.
# chmod -R a+rX /etc/httpd/logs
# chmod -R a+w /etc/httpd/logs/fastcgi
This worked for me...
You should disable your selinux security policies. Selinux is not recommended with web server.
I recently installed apache server via lamp on ubuntu, I tried to copy into /var/www a directory that includes scripts that I created on windows wampserver.
For some reason while trying to access this directory I get 403 Forbidden error.
Can someone help me please?
Recent apache log -
[Fri Jul 27 08:25:31 2012] [error] [client 127.0.0.1] (13)Permission denied: access to /cms-dev/index.html denied
[Fri Jul 27 08:25:31 2012] [error] [client 127.0.0.1] (13)Permission denied: access to /cms-dev/index.cgi denied
[Fri Jul 27 08:25:31 2012] [error] [client 127.0.0.1] (13)Permission denied: access to /cms-dev/index.pl denied
[Fri Jul 27 08:25:31 2012] [error] [client 127.0.0.1] (13)Permission denied: access to /cms-dev/index.php denied
[Fri Jul 27 08:25:31 2012] [error] [client 127.0.0.1] (13)Permission denied: access to /cms-dev/index.xhtml denied
[Fri Jul 27 08:25:31 2012] [error] [client 127.0.0.1] (13)Permission denied: access to /cms-dev/index.htm denied
[Fri Jul 27 08:25:31 2012] [error] [client 127.0.0.1] File does not exist: /var/www/favicon.ico
I think you will need write permissions for copying files into the var folder, also I suggest copying it as root, (with sudo cp file_name), because changing permissions of var and its subfolders for normal users are not recommended.
I had the same problem and solved it as below:
sudo usermod -a -G <username> www-data
sudo chown :www-data /var/www -R
sudo chmod g+rwX /var/www -R
sudo chmod g+s /var/www
Then try to re-login.
Ubuntu is doing some hard time and the only solution is that everytime you copy files to the folder you must run the following script in the terminal -
sudo chmod -R 777 /var/www
After adding the ff lines on httpd.conf
LoadModule passenger_module /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13
PassengerRuby /usr/local/bin/ruby
Apache won't start anymore
[root#localhost ~]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [FAILED]
Got this from log
[Thu Jul 12 11:26:58 2012] [error] *** Passenger could not be initialized because of this error: Unable to start the Phusion Passenger watchdog (/usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/agents/PassengerWatchdog): Permission denied (13)
[Thu Jul 12 11:26:58 2012] [notice] Digest: generating secret for digest authentication ...
[Thu Jul 12 11:26:58 2012] [notice] Digest: done
[Thu Jul 12 11:27:13 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Thu Jul 12 11:27:13 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 12 11:31:56 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Thu Jul 12 11:31:56 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Jul 12 11:38:22 2012] [notice] SELinux policy enabled; httpd running as context root:system_r:httpd_t:s0
[Thu Jul 12 11:38:22 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
Check the file permission on /usr/local/lib/ruby/gems/1.9.1/gems/passenger-3.0.13/agents/PassengerWatchdog and make sure that your apache user has permission to run it.
I'm not an expert in SELinux, but that's the cause of your problem. (Permissions and access to the watchdog process as the apache user).
Try looking here: Passenger/mod_rails fails to initialize in Fedora 12 when starting Apache
I installed memcache on my Ubuntu 10.04 machine but when it comes to restarting apache it gives me an error. My main root is /var/www/ and there is only index.php file in it.
Everything was working before installing memcache.
This is what I did.
Help please
ERROR:
myubuntu#ubuntu:~$ service apache2 restart
* Restarting web server apache2 (13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
APACHE LOG:
myubuntu#ubuntu:~$ tail -f /var/log/apache2/error.log
[Sun Mar 04 14:04:45 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sun Mar 04 18:54:35 2012] [notice] caught SIGTERM, shutting down
[Wed Mar 07 20:32:59 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Wed Mar 07 21:01:57 2012] [notice] caught SIGTERM, shutting down
[Fri Mar 09 22:20:06 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sat Mar 10 01:45:00 2012] [notice] caught SIGTERM, shutting down
[Sat Mar 10 10:58:24 2012] [notice] Apache/2.2.16 (Ubuntu) PHP/5.3.3-1ubuntu9.10 with Suhosin-Patch configured -- resuming normal operations
[Sat Mar 10 11:16:49 2012] [error] [client ::1] File does not exist: /var/www/favicon.ico
[Sat Mar 10 11:16:49 2012] [error] [client ::1] File does not exist: /var/www/favicon.ico
You have to be root. You may want to use sudo when starting Apache.