File permission adjustment for podman as root

This commit is contained in:
edr 2021-10-08 17:02:19 +02:00
parent c82acc8f52
commit e92ca2c39e

View file

@ -5,6 +5,11 @@ IFS=$'\n\t'
DIR="${0%/*}"
podman unshare -- chown -R 33 "$DIR"
podman unshare -- chgrp -R 0 "$DIR"
podman unshare -- chmod -R ug+rw "$DIR"
if [ $(id -u) -eq 0 ];then
podman exec nextcloud chown -R 33 /var/www/html/custom_apps
podman exec nextcloud chmod -R ug+rw /var/www/html/custom_apps
else
podman unshare -- chown -R 33 "$DIR"
podman unshare -- chgrp -R 0 "$DIR"
podman unshare -- chmod -R ug+rw "$DIR"
fi