sethforprivacy / simple-monerod-docker

A simple and straightforward Dockerized monerod built from source and exposing standard ports.
https://sethforprivacy.com/guides/run-a-monero-node/
MIT License
98 stars 19 forks source link

Keep getting permission denied. #34

Closed THX-101 closed 2 years ago

THX-101 commented 2 years ago

On my Synology I keep getting this exception when running a docker-compile for the sethsimmons/simple-monerod:

2022-03-16 14:11:22.763 I Initializing core...
2022-03-16 14:11:22.764 I Loading blockchain from folder /home/monero/.bitmonero/lmdb ...
2022-03-16 14:11:22.785 I Stopping cryptonote protocol...
2022-03-16 14:11:22.785 I Cryptonote protocol stopped successfully
2022-03-16 14:11:22.786 E Exception in main! boost::filesystem::create_directory: Permission denied: "/home/monero/.bitmonero/lmdb"

Docker containers run under a separate user that has full permissions (r/w + administration), but only to the volume "/volume1/docker/xmrchain/"), so docker run as non root by stating PUID and GUID.

You have an idea on what goes wrong here ? (I'm not so linux savvy, so please teach me a thing or two :)

sethforprivacy commented 2 years ago

The Synology side of things gets very weird with permissions, I gave up trying to run it as I couldn't get the permissions correct.

It's not an issue with the image, however, you just need to add the proper UID:GID user to Synology AFAICT.

If you do find the solution, please update here!

sethforprivacy commented 2 years ago

@THX-101 I was able to implement running as a different user and have tested it on my own Synology NAS, and it works perfectly now once you specify the correct UID:GID when starting the container as seen here:

https://github.com/sethforprivacy/simple-monerod-docker#running-as-a-different-user

The image with these changes is building now, should be available in an hour or two :)

THX-101 commented 2 years ago

Thank you very much man :)