Error: lock /data/ipfs/repo.lock: permission denied #10693
Labels
kind/bug
A bug in existing code (including security flaws)
need/triage
Needs initial labeling and prioritization
Checklist
Installation method
docker image
Version
Config
Description
Hello IPFS team,
I am running IPFS in AWS ECS using EFS as a permanent store. It is a development-environment setup with only one container running at a time. I am facing an issue when the container crashes and a consecutive try to start a new container by ECS scheduler fails as follows:
I can see that the file /data/ipfs/repo.lock is owned by root user, removing of the file does not help because the file is re-created again with the root file permissions.It is an ENTRYPOINT command that runs under root and incorrectly initializes IPFS in my understanding.
I may have it misconfigured, please suggest a proper solution if so.
In a meantime, I have managed to "fix" the aforementioned issue by creating my own Docker image with a following Dockerfile:
I have added USER directive and just copied everything else from your Dockerfile from the ENTRYPOINT onward. This way, I made sure that all runs under a correct ipfs user. I also deleted the lock file and all started to work again.
Is there any reason why you do not use USER directive? Are there any unwanted implications introduced by my fix? This way, you would be also able to get rid of gosu dependency and remove an user-switching logic from container_daemon script.
The text was updated successfully, but these errors were encountered: