Commit 8b5ac25
committed
keepalived-sync: fix mkdir permission denied in rsync.sh
The rsync.sh script uses sudo for rsync but not for mkdir. After the
first sync, rsync -a preserves root ownership on directories under the
sync target. Subsequent syncs fail at the mkdir step because the
keepalived user cannot create subdirectories inside root-owned
directories.
Use conditional sudo for mkdir to match the rsync behavior, falling
back to plain mkdir when sudo is not available.
Also update the sudoers configuration in the postinst script to permit
/bin/mkdir in addition to /usr/bin/rsync.
Fixes: #28565
Signed-off-by: willjayyyy <willjayyyy@users.noreply.github.com>1 parent f4aeec6 commit 8b5ac25
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
| 353 | + | |
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments