From a51051bc1a60ceba76a9cb43cc3a5c28327c79fe Mon Sep 17 00:00:00 2001 From: David Moreau-Simard Date: Wed, 22 Jun 2016 16:42:58 -0400 Subject: [PATCH] Don't hardcode user:group ownership after the "jenkins" name This will prevent permissions setting from failing when run under another user which can be expected when running in other environments or as openstack-infra phases out jenkins. Change-Id: Id4cf39e2d4fd21604d359eb6ce6a3716b6bba931 Depends-On: I58f6ee3ce22a3826fadfb019d3c67be710ab95d7 --- copy_logs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copy_logs.sh b/copy_logs.sh index 4904cdfc5..14eda429b 100755 --- a/copy_logs.sh +++ b/copy_logs.sh @@ -177,7 +177,7 @@ set -e # Also make sure zuul can rsync all the logs and configs sudo find $LOG_DIR -type d -execdir sudo chmod 755 '{}' \; sudo find $LOG_DIR -type f -execdir sudo chmod 644 '{}' \; -sudo chown -R jenkins:jenkins $LOG_DIR +sudo chown -R "$(id -u):$(id -g)" $LOG_DIR # do not try to save symlinks because source files might not have # the right permissions to let jenkins user to upload them on log servers.