views:

107

answers:

1

Hi, I am trying to use apache to access a XML from tomcat url like so:

http://localhost:8081/solr-example/select/?q=blah&version=2.2&start=0&rows=10&indent=on

However, I am getting a permission denied error. I have tried chown, chmod and chcon on both the tomcat and solr directories and it still gives me the error.

I am on centos/linux. Any help with this is much appreciated.

Cheers :) Ke

A: 

Possibles solutions:

  • Check if the xml is under WEB-INF directory.
  • Change the owner of the document to 'apache'.

PS: If you could post some of the log information, the detailed error (denied from what? the server, the SO, it's a 303 forbidden, etc) it will help.

Aito
I only get an error in my apache log and its just a generic one saying "permission denied", cant find the code right now because apache deleted the error log, i will try and reproduce the error shortly. catalina logs show nothing because the xml file isnt being accessed. Its definitely a problem with selinux, perhaps a context label needs to be set? i tried this already on the whole tomcat directory and it didnt work. its a v strange one i cant get my head around. I would prefer to use selinux in enforcing mode if i can, but at the moment it will only allow me permissive.
Ke