Compare commits
No commits in common. "95207905a9d7c76af682a88aea579851c1e26c47" and "e219602518ec04a7c573ddceb74f850c543d5459" have entirely different histories.
95207905a9
...
e219602518
12
init.sh
12
init.sh
@ -838,18 +838,6 @@ initUsers()
|
|||||||
isNotice "Removed a stale cron spool for $sudo_user_name (recycled uid)."
|
isNotice "Removed a stale cron spool for $sudo_user_name (recycled uid)."
|
||||||
fi
|
fi
|
||||||
sudo rm -f "$spool_dir/easydocker"
|
sudo rm -f "$spool_dir/easydocker"
|
||||||
|
|
||||||
# /home/$sudo_user_name may be owned by a stale uid from a previous install
|
|
||||||
# (e.g. the EasyDocker rename): useradd doesn't reclaim an existing home dir,
|
|
||||||
# so files inside — incl. restic's cache dir under ~/.cache/restic — end up
|
|
||||||
# unreadable by the new manager. restic then logs `mkdir: permission denied`
|
|
||||||
# every backup (non-fatal but slows them). Same recycled-uid pattern as the
|
|
||||||
# cron spool above. Idempotent: no-op when ownership already matches.
|
|
||||||
if [[ -d "/home/$sudo_user_name" \
|
|
||||||
&& "$(stat -c %u "/home/$sudo_user_name" 2>/dev/null)" != "$mgr_uid" ]]; then
|
|
||||||
sudo chown -R "$sudo_user_name":"$sudo_user_name" "/home/$sudo_user_name"
|
|
||||||
isNotice "Reclaimed /home/$sudo_user_name from a stale uid (recycled or rename)."
|
|
||||||
fi
|
|
||||||
# Install-phase sudo: the heavy install runs AS this user (see the handoff in
|
# Install-phase sudo: the heavy install runs AS this user (see the handoff in
|
||||||
# completeInitMessage) and needs BROAD root — useradd for the docker-install
|
# completeInitMessage) and needs BROAD root — useradd for the docker-install
|
||||||
# user, rootless setup, apt, sysctl, etc. So grant a temporary validated
|
# user, rootless setup, apt, sysctl, etc. So grant a temporary validated
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user