From e92ca2c39e6d2b05639ec7a9e56818ead5e76a5e Mon Sep 17 00:00:00 2001 From: edr Date: Fri, 8 Oct 2021 17:02:19 +0200 Subject: [PATCH] File permission adjustment for podman as root --- podman-reown.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/podman-reown.sh b/podman-reown.sh index ad6b6d2..c81773c 100755 --- a/podman-reown.sh +++ b/podman-reown.sh @@ -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