Fix zebra permissions

From Koha Wiki
Jump to navigation Jump to search

If you rebuild your zebra indexes as root instead of the koha user, you will change the file permissions. The result is that automatic updates of the indexes won't work any longer. The following instructions are for package installations of Koha. Copied from an email by Robin Sheat

By doing a rebuild_zebra with sudo, you've gone and broken your permissions again, stopping incremental updating from working. So here's what I'd do:

  • shut down anything to do with zebrasrv. 'sudo service koha-common stop' and some checking with ps to make sure there's nothing still running. If there is, figure out where it's coming from and kill it.
  • delete /var/lock/koha
  • delete /var/run/koha
  • delete /var/lib/koha
  • run 'sudo koha-create-dirs library'
  • rebuild everything: 'sudo koha-rebuild-zebra -f -v -v library'
  • start up zebrasrv: 'sudo service koha-common start'


Also note that as a result of deleting /var/lib/koha, you'll need to run 'sudo koha-email-enable library' to have email turned back on if you use that.