From e95e5f0e5df6decbfeb662559e176a80aad99143 Mon Sep 17 00:00:00 2001 From: David Moreau Simard Date: Tue, 12 Jan 2016 11:58:44 -0500 Subject: [PATCH] Use file permissions instead of ownership to grant access to files This means the script can run even if the jenkins user is not present. Change-Id: I1c93a841b82514fb146d827332eecea98d9dbd3b --- jenkins/scripts/copy_puppet_logs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/scripts/copy_puppet_logs.sh b/jenkins/scripts/copy_puppet_logs.sh index e9eb9f54f1..cb7e5fb6e2 100755 --- a/jenkins/scripts/copy_puppet_logs.sh +++ b/jenkins/scripts/copy_puppet_logs.sh @@ -165,8 +165,8 @@ cat /proc/cpuinfo > $LOG_DIR/cpuinfo.txt ps -eo user,pid,ppid,lwp,%cpu,%mem,size,rss,cmd > $LOG_DIR/ps.txt # Make sure jenkins can read all the logs and configs -sudo chown -R jenkins:jenkins $LOG_DIR/ -sudo chmod a+r $LOG_DIR/ $LOG_DIR/etc +sudo find $LOG_DIR -type d -execdir sudo chmod 755 '{}' \; +sudo find $LOG_DIR -type f -execdir sudo chmod 644 '{}' \; # rename files to .txt; this is so that when displayed via # logs.openstack.org clicking results in the browser shows the