Skip to content

Commit b8d8aaa

Browse files
committed
use chown on rsync to /data and /config directories
The lsiown command explicitly avoids touching symlinks, allowing root owned symlinks to bleed into PUID/PGID controlled areas. Use the chown arguments when using rsync to copy files to /data and /config to prevent creating symlinks with root permissions. Signed-off-by: Randolph Sapp <[email protected]>
1 parent 8f2cd9f commit b8d8aaa

File tree

1 file changed

+2
-2
lines changed
  • root/etc/s6-overlay/s6-rc.d/init-nextcloud-config

1 file changed

+2
-2
lines changed

root/etc/s6-overlay/s6-rc.d/init-nextcloud-config/run

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ if [ -f /config/www/nextcloud/config/needs_migration ] || [ -f /tmp/needs_instal
8181
rsync -rlD --exclude-from=/app/upgrade.exclude /app/www/src/ /app/www/public/
8282
for dir in apps config themes; do
8383
if [ -f /config/www/nextcloud/config/needs_migration ] || [ -f /tmp/needs_upgrade ] || [ -z "$(ls -A /app/www/public/${dir} 2>/dev/null)" ]; then
84-
rsync -rlD --include "/${dir}" --exclude '/*' /app/www/src/ /config/www/nextcloud/
84+
rsync -rlD --chown=abc:abc --include "/${dir}" --exclude '/*' /app/www/src/ /config/www/nextcloud/
8585
fi
8686
done
8787
if [ -z "$(ls -A /data/ 2>/dev/null)" ]; then
88-
rsync -rlD --include "/data" --exclude '/*' /app/www/src/ /
88+
rsync -rlD --chown=abc:abc --include "/data" --exclude '/*' /app/www/src/ /
8989
fi
9090

9191
echo "Setting permissions"

0 commit comments

Comments
 (0)