mirror of
https://github.com/linuxserver/docker-nextcloud.git
synced 2026-02-19 23:03:50 +08:00
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 <rs@ti.com>
This commit is contained in:
parent
bf3466672a
commit
f850beb81e
@ -81,11 +81,11 @@ if [[ -f /config/www/nextcloud/config/needs_migration ]] || [[ -f /tmp/needs_ins
|
||||
rsync -rlD --exclude-from=/app/upgrade.exclude /app/www/src/ /app/www/public/
|
||||
for dir in apps config themes; do
|
||||
if [[ -f /config/www/nextcloud/config/needs_migration ]] || [[ -f /tmp/needs_upgrade ]] || [[ -z "$(ls -A /app/www/public/${dir} 2>/dev/null)" ]]; then
|
||||
rsync -rlD --include "/${dir}" --exclude '/*' /app/www/src/ /config/www/nextcloud/
|
||||
rsync -rlD --chown=abc:abc --include "/${dir}" --exclude '/*' /app/www/src/ /config/www/nextcloud/
|
||||
fi
|
||||
done
|
||||
if [[ -z "$(ls -A /data/ 2>/dev/null)" ]]; then
|
||||
rsync -rlD --include "/data" --exclude '/*' /app/www/src/ /
|
||||
rsync -rlD --chown=abc:abc --include "/data" --exclude '/*' /app/www/src/ /
|
||||
fi
|
||||
|
||||
echo "Setting permissions"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user