cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Unable to start neo4j container (Permission denined)

Greetings everyone,

I'm unable to start neo4j container when I run docker-compose. I get the following errors in docker logs:

> docker logs neo4j
Changed password for user 'neo4j'.
chown: /data/dbms/auth.ini: Permission denied
chown: /data/dbms: Permission denied
chown: /data/dbms: Permission denied
chown: /data: Permission denied
chown: /data: Permission denied

I have verified that read/write permissions are there for the signed in user on the corresponding files and directories. Any idea how can I fix this?

1 REPLY 1

I was able to resolve this issue. Please find the answer here:
https://stackoverflow.com/a/75219043/6866739


The core of the issue lies with bind mounted volumes. Previously, docker desktop had elevated privileges / permissions but now after shifting over to colima, the same privileges were no longer there.

User permissions weren't being passed on properly to the containers, resulting in them being unable to access the binded volumes on the host machine. The solution is to add a user:group or uid:gid mapping in the docker run command or the docker-compose file etc.

user: "<uid>:<gid>"  

In a docker-compose file, it would look like this:

version: '3.4'
services:
  neo4j:
      image: neo4j:3.5.5
      container_name: neo4j
      ports:
          - 7474:7474
          - 7687:7687
      volumes:
          - ./example/docker/neo4j/conf:/conf
          - ./.local/neo4j/data:/var/lib/neo4j/data
      user: '1000'
      group_add:
      - '1000'

For further information, please go through the following docs/threads:

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online