LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Other *NIX
User Name
Password
Other *NIX This forum is for the discussion of any UNIX platform that does not have its own forum. Examples would include HP-UX, IRIX, Darwin, Tru64 and OS X.

Notices

Reply
 
Search this Thread
Old 09-10-2008, 05:16 PM   #1
vishwakumarbg
LQ Newbie
 
Registered: Sep 2008
Posts: 3

Rep: Reputation: 0
Question Apache 2 - RHEL4u5 - Permission denied: httpd: could not open error file


#cat /etc/hosts
127.0.0.1 vmrhes04-02.vishwa.net vmrhes04-02 localhost.localdomain localhost


#cat /etc/resolv.conf
search vishwa.net
nameserver x.x.x.x

#cat /var/log/httpd/error_log
(13)Permission denied: httpd: could not open error log file /test02/log/errorlog.
Unable to open logs
(13)Permission denied: httpd: could not open error log file /test02/log/errorlog.
Unable to open logs

[root@vmrhes04-02 test02]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [FAILED]
[root@vmrhes04-02 test02]#
[root@vmrhes04-02 test02]# ls -ltR

drwxrwxrwx 2 root root 4096 Sep 10 17:26 www
drwxrwxrwx 2 root root 4096 Sep 10 17:24 log

./www:
total 8
-rwxrwxrwx 1 root root 518 Sep 10 17:26 index.html

./log:
total 12
-rwxrwxrwx 1 root root 15 Sep 10 17:28 errorlog
-rwxrwxrwx 1 root root 0 Sep 10 17:24 customlog
[root@vmrhes04-02 test02]# pwd
/test02
[root@vmrhes04-02 test02]#

cat /etc/httpd/conf/httpd.conf
.....
<VirtualHost *:80>
ServerAdmin vishwakumarbg@gmail.com
DocumentRoot /test02/www
ServerName www.cnn.com
ErrorLog /test02/log/errorlog
CustomLog /test02/log/customlog common
</VirtualHost>




QUESTION:
How to clear the error which is coming in /var/log/httpd/error_log
Permission denied ????

Your help will be Appreciated.


Rgds
vishwa
vishwakumarbg@gmail.com
 
Old 09-12-2008, 01:53 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Show the output of :

Code:
ls -ld /test02/log/errorlog /test02/log /test02
 
Old 09-13-2008, 03:30 AM   #3
sunils1973
Member
 
Registered: Jan 2007
Location: INDIA
Distribution: Ubuntu, Debian
Posts: 320

Rep: Reputation: 30
ls -lZd /var/www/htdocs also
 
Old 09-15-2008, 01:34 PM   #4
vishwakumarbg
LQ Newbie
 
Registered: Sep 2008
Posts: 3

Original Poster
Rep: Reputation: 0
I changed to /data01.

Here is the details.
---------------------------------------------------------------
[root@vmrhes04-01 conf]# tail -12 /etc/httpd/conf/httpd.conf
<Directory /data01/www>
Options FollowSymLinks Includes
AllowOverride All
</Directory>

<VirtualHost *:80>
ServerAdmin vishwakumarbg@gmail.com
DocumentRoot /data01/www/vishwa.kumar.net
ServerName vishwa.kumar.net
ErrorLog /data01/log/vknet-error_log
CustomLog /data01/log/vknet-access_log common
</VirtualHost>
---------------------------------------------------------------
[root@vmrhes04-01 conf]# ls -ld /data01/www/vishwa.kumar.net /data01/log
drwxr-xr-x 2 apache apache 4096 Sep 13 14:56 /data01/log
drwxr-xr-x 2 apache apache 4096 Sep 13 14:56 /data01/www/vishwa.kumar.net
---------------------------------------------------------------
[root@vmrhes04-01 conf]# ls -ls /data01/log/vknet-error_log /data01/log/vknet-access_log
4 -rwxr-xr-x 1 apache apache 0 Sep 13 14:56 /data01/log/vknet-access_log
4 -rwxr-xr-x 1 apache apache 0 Sep 13 14:56 /data01/log/vknet-error_log
---------------------------------------------------------------
[root@vmrhes04-01 conf]# service httpd restart
Stopping httpd: [FAILED]
Starting httpd: Warning: DocumentRoot [/data01/www/vishwa.kumar.net] does not exist
[FAILED]

---------------------------------------------------------------
[root@vmrhes04-01 conf]# ls -ld /data01 /data01/log /data01/log/vknet-error_log
drwxr-xr-x 4 apache apache 4096 Sep 13 13:37 /data01
drwxr-xr-x 2 apache apache 4096 Sep 13 14:56 /data01/log
-rwxr-xr-x 1 apache apache 0 Sep 13 14:56 /data01/log/vknet-error_log
[root@vmrhes04-01 conf]#
---------------------------------------------------------------
Error in /var/log/httpd/error_log file

(13)Permission denied: httpd: could not open error log file /data01/log/vknet-error_log.
Unable to open logs


I see the permission is apache and it is 755

Regards
Vishwakumar BG
973 216 1145
vishwakumarbg@gmail.com
 
Old 09-15-2008, 02:36 PM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
So you've changed the game on us, now we need to restart.

We need to see ALL the permissions for the directories leading from root down to /data01/log/vknet-error_log. Please take note of what I asked to see, and what you provided.

Show:

ls -ld / /data01 /data01/log /data01/log/vknet-error_log
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Hellanzb 'Connect error: Permission denied (13)' S0uthy Linux - Server 3 10-01-2007 01:21 AM
Failed to start apache :Starting httpd: Syntax error on line 1027 of /etc/httpd/conf/ payjoe Linux - Newbie 3 09-21-2007 07:24 AM
I have an apache problem Starting httpd: (13)Permission denied: make_sock: could not LinuxCrazy Linux - Server 1 06-24-2007 05:24 PM
SAMBA ERROR: cannot create regular file `~/tux016.pdf': Permission denied mokele Linux - Software 5 02-07-2007 04:37 PM
cannot open shared object file: Permission denied cchristian Linux - Software 5 07-30-2005 10:52 AM


All times are GMT -5. The time now is 07:35 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration