diff options
author | Simon Rettberg | 2021-07-27 14:43:37 +0200 |
---|---|---|
committer | Simon Rettberg | 2021-07-27 14:44:58 +0200 |
commit | 34fdca0bed30989e7af6f37e57f81174ebd62184 (patch) | |
tree | b0c5c64f8b50170232e973e51e92a868f5f8c87e /core/modules/disk-partitions | |
parent | setup_target: Fix meta/ directory mysteriously vanishing (diff) | |
download | mltk-34fdca0bed30989e7af6f37e57f81174ebd62184.tar.gz mltk-34fdca0bed30989e7af6f37e57f81174ebd62184.tar.xz mltk-34fdca0bed30989e7af6f37e57f81174ebd62184.zip |
[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
Diffstat (limited to 'core/modules/disk-partitions')
-rwxr-xr-x | core/modules/disk-partitions/data/opt/openslx/scripts/systemd-setup_partitions | 6 |
1 files changed, 3 insertions, 3 deletions
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" |