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 b075354 commit 062e3ff
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 @@ -810,8 +810,8 @@ initialize_datadir() {
)
for dir in "${datafolders[@]}"; do
mkdir -p "${dir}"
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

# special permissions for ~/.ssh
Expand Down

0 comments on commit 062e3ff

Please sign in to comment.