-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ipfs in container creates files with root as owner #8725
Comments
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
Finally, remember to use https://discuss.ipfs.io if you just need general support. |
podman top output:
|
I will reopen this issue if get more information when exactly ipfs creates files owned by root. |
I have the same issue (up to now only with repo.lock) running ipfs kubo in container with version 0.15.0. |
I had solved this issue by adding |
Reopening this issue because it affects not only my. |
Thank your for your answers! Really appreciated. I get why the fix might (not suggesting that it does not, but I do not understand the exact why) work, since I found this before I found this issue https://github.com/ipfs/kubo/blob/master/bin/container_daemon#L7-L13 and I have been of the opinion that it should work. |
OK. This is strange. Now I also don't understand why there are files owned by root. |
And btw.: Not setting user in Dockerfile, but changing it in the entrypoint script seems unusual. However, one benefit is that the cli process is still able to read files not belonging to the ipfs user. So, if I use |
This also affected me. Last week node created a file owned by root, which was As of now my docker-compose.yml entry fro this service is as follows ipfsnode:
restart: always
image: ipfs/go-ipfs:v0.14.0
privileged: true
volumes:
- "/hdd/ipfs2/ipfs_staging:/export"
- "/hdd/ipfs2/ipfs_data:/data/ipfs"
healthcheck:
interval: 5s
ports:
- "0.0.0.0:5021:5001"
- "0.0.0.0:8080:8080" Hope to see a solution soon, thanks |
Hi, I'm having still the same issue with the current version. I'm running the Kubo container through docker compose with a non-root user but it still create a ../home/ipfs directory and files owned by root. Any advise for these folders to be created with the user I'm executing docker compose as the owner? |
I'm just adding my +1 here. I'm running a Kubo container on AWS ECS with Fargate and occasionally (not always) get the error:
The logs:
This happens in ~5-10% of the Kubo boots. Setting the |
For everyone who's watching this. We believe to have fixed the issue. The problem seems to have been that the health check command ran before the daemon process started. Commonly, the health check is run as root and initializes the repository. The daemon, which is run as a non-privileged user by default, doesn't have permission to interact with that. This was fixed in #9992 by passing a flag to the health check command that prevents it from initializing the repository. |
I still have the issue. I've been running ipfs in a container on AWS Fargate. ipfs version 0.25.0 Error: lock /data/ipfs/repo.lock: permission denied I'm also trying to delete the repo.lock when the container starts but I struggle to extend the ENTRYPOINT and CMD to run a custom script that deletes this file. I can't login into the container to delete the file by hand. Any idea how I can automatically delete this file as the root user? |
I've made a fix for this |
Checklist
Installation method
third-party binary
Version
Config
Description
Since the go-ipfs v0.11 container from docker.io/ipfs/go-ipfs, files with root as owner are sometimes created and then ipfs cannot access these files.
Previously I had this problem with
repo.lock
and now with the database file.go-ipfs v0.10 and earlier did not have this problem.
When this problem first appeared, after updating to v0.11, I rolled back to v0.10 and the problem went away.
and root owned file itself
Repo.lock created with root as owner:
The text was updated successfully, but these errors were encountered: