If we create the log dir chown it to log file owner
This commit is contained in:
parent
f4000f9c36
commit
d3c21028b0
1 changed files with 8 additions and 0 deletions
|
|
@ -281,6 +281,14 @@ check_logdir()
|
|||
else
|
||||
echo "Directory ${LOGDIR} successfully created."
|
||||
fi
|
||||
echo "Attempting to change owner:group of ${LOGDIR} to ${LOG_FILE_OWNER} ..."
|
||||
if ! chown ${LOG_FILE_OWNER} ${LOGDIR}; then
|
||||
echo "User ${USER} could not change the owner:group of ${LOGDIR} to $LOG_FILE_OWNER"
|
||||
echo "Aborting..."
|
||||
exit 1
|
||||
else
|
||||
echo "Directory ${LOGDIR} successfully changed to owner:group of ${LOG_FILE_OWNER}"
|
||||
fi
|
||||
elif [ ! -w ${LOGDIR} ]; then
|
||||
echo "Log directory ${LOGDIR} is not writeable by this user: ${USER}"
|
||||
echo "Aborting..."
|
||||
|
|
|
|||
Loading…
Reference in a new issue