Script I'm working on has this code bit, which fails with "Permission denied" message:
The code works if the target folder permission is set as "777", but fails for regular "755". How can I debug this error?
Code:
: ${jenkins_user="jenkins-builder"}
: ${jenkins_group="jenkins"}
......
if [ ! -f "${jenkins_log_file}" ]; then
touch "${jenkins_log_file}"
chown "${jenkins_user}:${jenkins_group}" "${jenkins_log_file}"
chmod 640 "${jenkins_log_file}"