From 34fdca0bed30989e7af6f37e57f81174ebd62184 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 27 Jul 2021 14:43:37 +0200 Subject: [disk-partitions] Force permissions of persistent mount point Some systems ended up with 0700 on the persistent mount point. Set it to 0755 on every mount to be sure. Closes #3870 --- .../data/opt/openslx/scripts/systemd-setup_partitions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/modules/disk-partitions') diff --git a/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions b/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions index 94a5ca21..b0e1dad9 100755 --- a/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions +++ b/core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions @@ -303,8 +303,6 @@ if [ -n "$DO_PERSISTENT" ]; then mkdir -p "${MOUNT_POINT_45}/slx_lost+found" mv -f -- "${MOUNT_POINT_45}/lost+found" "${MOUNT_POINT_45}/slx_lost+found/$(date +%s)_$$-$RANDOM" fi - chmod 0700 "${MOUNT_POINT_45}/slx_lost+found" - chown 0:0 "${MOUNT_POINT_45}/slx_lost+found" # fstab entry echo -e "${PART_DEV}\t${MOUNT_POINT_45}\tauto\t\tnoauto\t\t 0 0" >> "/etc/fstab" HAVE_PARTITION_45=yes @@ -315,7 +313,9 @@ fi # /persistent # finally, prepare the data subdir on persistent part if [ "$HAVE_PARTITION_45" = "yes" ]; then mkdir -p "$MOUNT_POINT_45/data" - chown root:root "$MOUNT_POINT_45" "$MOUNT_POINT_45/data" + chown 0:0 "${MOUNT_POINT_45}" "${MOUNT_POINT_45}/slx_lost+found" "${MOUNT_POINT_45}/data" + chmod 0700 "${MOUNT_POINT_45}/slx_lost+found" + chmod 0755 "${MOUNT_POINT_45}" chmod a+rwxt "$MOUNT_POINT_45/data" elif [ -d "$MOUNT_POINT_45" ]; then rm -f -- "$MOUNT_POINT_45" -- cgit v1.2.3-55-g7522