[Xapian-discuss] "Exception: Couldn't read format template `query' (Permission denied)" - help?

The Dog's Bollix isxpro at yahoo.com
Fri Jul 1 02:31:22 BST 2011


James, 

Thank you for the speedy response. For any other newbie to this, my problem actually was SELinux. 

I disabled the SELinux protection and the command omindex completed, the database was created and the browser search interface worked as advertised. 

Just for good measure, before I ran the omindex command I chmod -R 777 the omega directory before I ran the command. 

Thanks to James for such a quick response. I'm off to spend the holiday weekend playing with this. 

Kind regards, 

Encee

--- On Thu, 6/30/11, James Aylett <james-xapian at tartarus.org> wrote:

From: James Aylett <james-xapian at tartarus.org>
Subject: Re: [Xapian-discuss] "Exception: Couldn't read format template `query' (Permission denied)" - help?
To: "The Dog's Bollix" <isxpro at yahoo.com>
Cc: xapian-discuss at lists.xapian.org
Date: Thursday, June 30, 2011, 5:05 PM

On 30 Jun 2011, at 20:08, The Dog's Bollix wrote:

> The exact error message: 
> 
> "Exception: Couldn't read format
> template `query' (Permission denied)"

This means that the template 'query', which I think should be installed in /var/lib/omega/templates in your case (although I'm not sure whether `make install` actually does this), can't be read by the omega CGI program.

> The error message indicates a permissions problem, but I've gone back and verified the permissions
> on every file and they are all set to the values listed. 
> 
> [root at Eagle1 bin]# ls -ld /var /var/lib /var/lib/omega
> drwxrwxrwx. 21 root root 4096 Jun 30 14:46 /var
> drwxrwxrwx. 56 root root 4096 May 18 07:33 /var/lib
> drwxrwxrwx.  5 root root 4096 Jun 30 13:08 /var/lib/omega

What does the following give you:

ls -l /var/lib/omega /var/lib/omega/templates

> When I run omega from the command line it outputs a page of html in the shell

Which suggests that your user has suitable access to the templates, but that your website user or configured CGI user does not.

> When I run this test a query log is created in var/log/omega
[...]
> When I run the omega command as per the OmegaExample page:
[...]
> there is no entry in query.log. 

This is expected; the indexer will not write to the query log.

Best,
James

-- 
 James Aylett
 talktorex.co.uk - xapian.org - devfort.com - spacelog.org



More information about the Xapian-discuss mailing list