From 56a65f4923b8dcb484166debc65bfd73d7cdb0b4 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Wed, 9 Aug 2023 08:30:03 -0500 Subject: [PATCH] Fix up permissions when a different user restores During checkpoint the current user creates resources and directories for which the restore user needs permission to read and write. This change fixes up the permissions to allow a different from the checkpoint user to restore the process. --- ga/latest/kernel/helpers/build/checkpoint.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ga/latest/kernel/helpers/build/checkpoint.sh b/ga/latest/kernel/helpers/build/checkpoint.sh index dba7820ff..7c8f6d189 100755 --- a/ga/latest/kernel/helpers/build/checkpoint.sh +++ b/ga/latest/kernel/helpers/build/checkpoint.sh @@ -9,5 +9,13 @@ done echo "Performing checkpoint --at=$1" /opt/ibm/wlp/bin/server checkpoint defaultServer --at=$1 +# Find all directories in logs/ and output/ that the current user has read/write/execute permissions for +# and give the same permissions to the group. +find -L /logs /output -type d -readable -writable -executable -exec chmod g+rwx {} \; + +# Find all files in logs/ and output/ that the current user has read/write permissions for +# and give the same permissions to the group. +find -L /logs /output -type f -readable -writable -exec chmod g+rw {} \; + rc=$? exit $rc