Compare commits
2 Commits
e219602518
...
95207905a9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95207905a9 | ||
|
|
50415a8655 |
12
init.sh
12
init.sh
@ -838,6 +838,18 @@ 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