ayufan / pve-backup-server-dockerfiles

Unofficial, and unmaintained build of proxmox-backup-server
348 stars 60 forks source link

Docker user permissions - change from backup #49

Open bobmarley2021 opened 6 months ago

bobmarley2021 commented 6 months ago

Apologies if this is obvious, I am fairly new to docker - but can you explain how to change the permissions that the docker container uses to write to the host file system?

I currently see the user as backup with read/write perms, the group as backup but without any perms and other without any perms. If the group had read/write perms this would make it easier as I could just add my user to that group, or ideally, a way to specify the user instead of using backup.

I was expecting to see some reference to the backup user in the compose, as it is my understanding that usually when no user is specified that docker will use the root account but I cannot see anything that allows me to change this?

Any idea how to do this?

lqGUaya

bobmarley2021 commented 6 months ago

Ahh, looks like it is specified in: runit/proxmox-backup-proxy/run

#!/bin/bash

if [[ ! -e /etc/proxmox-backup/csrf.key ]]; then
  echo "PROXY: The proxmox-backup is not yet configured!"
  exit 1
fi

echo "PROXY: Starting..."
exec chpst -u backup:backup /usr/lib/*/proxmox-backup/proxmox-backup-proxy

And here: runit/proxmox-backup-api/run

# ensure that etc is owned by backup (due to configs)
chown backup:backup /etc/proxmox-backup
chmod 700 /etc/proxmox-backup

# ensure that lib is owned by backup (due to jobstates and rrdb)
chown backup:backup /var/lib/proxmox-backup
chmod 700 /var/lib/proxmox-backup

# ensure that logs are owned by backup
chown backup:backup /var/log/proxmox-backup
chmod 700 /var/log/proxmox-backup

Would it be possible to add the option to change this via compose?

bobmarley2021 commented 3 months ago

Not any comment after all this time? Is this project still active?