Repo.lock permissions denied

Hi,
I’m running Kubo on AWS Fargate in a container.
If the container gets killed the repo.lock file remains and I cannot start my container again.
Also the repo.lock file is apparently owned by root, so the “ipfs” user can’t even delete it…

I tried to create my own Docker image, created my own Dokerfile and tried to extend the ENTRYPOINT to run my own script. This script tries to delete the repo.lock file before starting the IPFS daemon.

I can’t manage to make this work thought. It looks like my script is unable to extend the ENTRYPOINT and CMD correctly.

Anyone has an example on how I can run my own code when the containers starts up, as root, just before the ipfs daemon starts?

And why is the repo.lock file owned by root? This shouldn’t be…

The question is under what rights are you running your node? This user should own the directory listed in IPFS_PATH, otherwise the repository will not work correctly. I guess, in the container, the IPFS daemon runs as root or you run it from the script owned (or being run) by username with granted administration rights.