diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-09-25 03:09:15 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-09-25 03:09:15 -0400 |
| commit | 2f428d1a3f4b65cadab0259938d7aa3e5b0e3b80 (patch) | |
| tree | 4253fc8787ba617aced06061489be834240ed05b | |
| parent | e8741ae29549838e9512705599359e2ef7eb1cd3 (diff) | |
| download | sbo-maintainer-tools-2f428d1a3f4b65cadab0259938d7aa3e5b0e3b80.tar.gz | |
sbodl: chown downloaded files to the cache dir's owner if running as root.
| -rwxr-xr-x | sbodl | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -267,6 +267,9 @@ for dl in $DL; do else wget $EXTRAWGETARGS $WGETARGS "$dl" || die "Download failed, try '$SELF -a'." if [ -e "$FILE" ]; then + # the chown keeps sbrun sudo users from having root-owned + # files in ~/sbodl-cache. + chown --reference="$CACHEDIR" "$FILE" &>/dev/null mv -b "$FILE" "$CACHEDIR" ln -s "$CACHEDIR/$FILE" "$FILE" fi |
