Permission denied in Docker container

I’m trying to use the Docker image, and when trying to use a local directory for a volume for /var/lib/manticore/data, but I’m getting the following error message:

WARNING: index 'sermons_index': prealloc: failed to open file '/var/lib/manticore/data/sermons.new.spa': 'Permission denied'; NOT SERVING

This looks like I don’t have the correct permissions set on the directory. I’ve tried setting the owner to root:root, to 999:999 and a few other things, but none of them seem to work. Can anyone tell me what they should be?

I did notice that my PostgreSQL container reset the permissions on its data folder on startup, does Manticore Search do the same?

I’m running this with Docker Compose on Debian Linux. The data directories are in my home directory. Here’s an excerpt from my docker-compose.yaml file:

  search:
    image: manticoresearch/manticore
    volumes:
      - "/home/raoul/search/etc:/etc/sphinxsearch"
      - "/home/raoul/search/data:/var/lib/manticore/data"
      - "/home/raoul/search/logs:/var/lib/manticore/logs"
    links:
      - db

Thanks in advance for the help!

Hi, there was a recent change and searchd runs under manticore user inside the instance, you must run indexer under ‘manticore’ user like

docker exec -it  <container_name>  gosu manticore indexer --all --rotate

The error you get is likely because you run docker exec -it manticore indexer --all --rotate and files are owned by the inside root.

I’ll update the docs to reflect this change.

Aha! That makes sense, thank you!