mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-06 21:57:48 +01:00
Compare commits
1 Commits
v1.4.3
...
feature/55
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4d8a587d8b |
@@ -17,13 +17,15 @@ if [ -e /app/config ]; then
|
|||||||
CURRENT_UID=$(stat -c %u /app/config)
|
CURRENT_UID=$(stat -c %u /app/config)
|
||||||
CURRENT_GID=$(stat -c %g /app/config)
|
CURRENT_GID=$(stat -c %g /app/config)
|
||||||
|
|
||||||
if [ "$CURRENT_UID" -ne "$PUID" ] || [ "$CURRENT_GID" -ne "$PGID" ]; then
|
if [ "$CURRENT_UID" -eq "$PUID" ] && [ "$CURRENT_GID" -eq "$PGID" ]; then
|
||||||
echo "Fixing ownership of /app/config"
|
echo "/app/config already owned by correct UID/GID, skipping chown"
|
||||||
if ! chown -R "$PUID:$PGID" /app/config 2>/dev/null; then
|
if ! [ -w /app/config ]; then
|
||||||
echo "Warning: Could not chown /app/config; continuing anyway"
|
echo "Warning: /app/config is not writable by UID $PUID — this can happen with bind mounts"
|
||||||
|
echo "Hint: Run 'chmod -R u+rwX /path/to/config' on the host"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "/app/config already owned by correct UID/GID, skipping chown"
|
echo "Fixing ownership of /app/config"
|
||||||
|
chown -R "$PUID:$PGID" /app/config 2>/dev/null || echo "Warning: Could not chown /app/config"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "/app/config does not exist; skipping ownership check"
|
echo "/app/config does not exist; skipping ownership check"
|
||||||
|
|||||||
Reference in New Issue
Block a user