Skip to content

Commit

Permalink
functions: only update file-permissions when needed
Browse files Browse the repository at this point in the history
Modifying the permissions only for files that have wrong permissions will speed up container start. A welcome sideeffect is no change of ctime, which helps to prevent not needed external backups.
  • Loading branch information
SvenRoederer committed Feb 27, 2024
1 parent 264b838 commit b5c4eac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/runtime/functions
Original file line number Diff line number Diff line change
Expand Up @@ -803,8 +803,8 @@ initialize_datadir() {
if [ ${REDMINE_DATA_DIR} = ${dir} ]; then
mkdir -p ${dir}
fi
chmod -R u+rw,go+r ${dir}
chown -R ${REDMINE_USER}: ${dir}
find ${dir} \! -perm -u=wr,go=r -print0 | xargs -0 -r chmod u+rw,go+r
find ${dir} \! -user ${REDMINE_USER} -print0 | xargs -0 -r chown ${REDMINE_USER}:
done
}

Expand Down

0 comments on commit b5c4eac

Please sign in to comment.