lobaro / restic-backup-docker

A docker container to automate backups with restic
Apache License 2.0
330 stars 114 forks source link

Permission denied on OpenShift #47

Closed daquinoaldo closed 3 years ago

daquinoaldo commented 4 years ago

Hi, I receive a permission denied error when running on OpenShift.

It occurs when the init script tries to perform mkdir in a subpath of /mnt and again when it tries to setup the cron job.

This is a known bug, with an official fix. OpenShift Container Platform runs containers using an arbitrarily assigned user ID instead of privileged user (root). Since the user inside the container is not root, it hasn't the permissions to perform some operations you do in the bootstrap script, like creating directory inside /mnt or setup the cron job (that btw I really enjoy, thanks!).

The bug affects all the OpenShift users.
I'll open a PR, I hope you will consider merging the fix, to allow your image to be run on OpenShift.

niondir commented 3 years ago

Thanks a lot for the contribution.

daquinoaldo commented 3 years ago

Thank you for your work!