Operating System - Linux
1828962 Members
2142 Online
109986 Solutions
New Discussion

Re: audit with httpd tried to use file system at diff partition

 
SOLVED
Go to solution
Tammy Liang
Regular Advisor

audit with httpd tried to use file system at diff partition

I got error message below after I try to start apache httpd daemon. I also see kernel: audit: avc: denied message in /var/log/messages file.

Starting httpd: Syntax error on line 265 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory

kernel: audit(1169587778.590:13): avc: denied { search } for pid=5072 comm="httpd" name="/" dev=sdb2 ino=2 scontext=root:system_r:httpd_t tcontext=system_u:object_r:file_t tclass=dir
take easy, enjoy life
6 REPLIES 6
Tammy Liang
Regular Advisor

Re: audit with httpd tried to use file system at diff partition

From the message for /var/log/messages file,
looks audit is involved.
How can I set audit or permission on
partition?

Thanks for any help and reply.

take easy, enjoy life
Ivan Krastev
Honored Contributor

Re: audit with httpd tried to use file system at diff partition

Take a look at this part:
Starting httpd: Syntax error on line 265 of /etc/httpd/conf/httpd.conf:
DocumentRoot must be a directory


fix document root for apache.


regards,
ivan
Steven E. Protter
Exalted Contributor
Solution

Re: audit with httpd tried to use file system at diff partition

Shalom,

By default if you enabled SELINUX you will not be permitted a rootdocument for httpd server outside the /var filesystem.

Choices:
Totally disable selinux
Change selinux configuration to permit this.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Tammy Liang
Regular Advisor

Re: audit with httpd tried to use file system at diff partition

There is /users/web directory which is defined in DocumentRoot.

I don't think I have SElinux turned it on.
How can I check? How can i turn it off?

Thanks.
take easy, enjoy life
Ivan Krastev
Honored Contributor

Re: audit with httpd tried to use file system at diff partition

Use: sestatus
to obtain status of selinux.

For configuration use: system-config-securitylevel

There you can disable selinux for specific daemons - apache for example.


regards,
ivan
Tammy Liang
Regular Advisor

Re: audit with httpd tried to use file system at diff partition

Thanks, I got SElinux to enable apache to write to /users directory.
take easy, enjoy life