diff --git a/README.md b/README.md index 3bfb951..d6d4097 100644 --- a/README.md +++ b/README.md @@ -38,3 +38,5 @@ Host SMTP password Host SMTP From ### PBS_ADMIN_PASSWORD PBS default password (change it after boot the container), 5 chars minimum, if less, then crash +### PBS_FIXPERM +If set to any values, apply fix permissions on PBS repo \ No newline at end of file diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index ae6a716..b4f8be4 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -9,11 +9,16 @@ usermod -o -u "$PUID" backup #Fix perm mkdir -p /etc/proxmox-backup -chown -R backup:backup /etc/proxmox-backup -chown -R backup:backup /var/lib/proxmox-backup -chown -R backup:backup /var/log/proxmox-backup -chown -R backup:backup /backups -chmod -R 700 /etc/proxmox-backup +if [ -z $PBS_FIXPERM ]; then + echo "Skip fix perm" +else + echo "Fix perm" + chown -R backup:backup /etc/proxmox-backup + chown -R backup:backup /var/lib/proxmox-backup + chown -R backup:backup /var/log/proxmox-backup + chown -R backup:backup /backups + chmod -R 700 /etc/proxmox-backup +fi if [ -z $PBS_ADMIN_PASSWORD ]; then export PBS_ADMIN_PASSWORD=admin; fi