Skip to content

Commit

Permalink
Fix permissions for XDG like paths
Browse files Browse the repository at this point in the history
- If user mounts paths in a XDG path the mount permission can break
  other tools what use XDG paths
  • Loading branch information
Ryan Luckie authored and rtluckie committed Jul 2, 2020
1 parent 9f37ca8 commit fa4a602
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions files/usr/local/bin/provision-user
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ if [[ ! -f "/etc/kdk/provisioned" ]]; then

# Ensure permissions for a few locations
chown ${KDK_USERNAME}:${KDK_USERNAME} /home/${KDK_USERNAME}
for item in config cache local; do
ITEM_PATH="/home/${KDK_USERNAME}/.${item}"
if [[ -d "${ITEM_PATH}" ]]; then
chown -R ${KDK_USERNAME}:${KDK_USERNAME} ${ITEM_PATH}
fi
done
chown -R ${KDK_USERNAME}:${KDK_USERNAME} /go
install -m 0600 -o ${KDK_USERNAME} /dev/null /var/log/kdk-provision.log

Expand Down

0 comments on commit fa4a602

Please sign in to comment.