"Only file owners can chmod files. Since the apache user is usually a restricted user, with no shell, it's difficult to fire off cron jobs to update indexes out of band. This means that typically another user should do this. But the other user needs to take over ownership of the index files, and in that case, apache can no longer read the indexes and search breaks."

Is anyone else having difficulty with this? Is there a workaround?

As I am using an ant build to trigger the creation of an index, the index is owned by the user that triggered the build (in my local dev environment myself, and on our dev server this is cruisecontrol). However, apache of course runs as a different user.

The only way I can get round this at the moment is running a chown on the index directory after the build takes place to make the owner the apache user. I of course have to reverse this before doing any index maintenance through our ant script... beyond the clumsiness of this is the issue that the index will be unavailable to users during each period of maintenance performed on the search.

The only other way round this is to change the user that runs our ant script to that of our apache user... but that seems like quite a hack...

Anyone else overcoming/struggling with this issue?

Reply via email to