Skip to content

keepalived-sync: fix mkdir permission denied in rsync.sh#28687

Open
willjayyyy wants to merge 1 commit intoopenwrt:masterfrom
willjayyyy:fix/keepalived-sync-mkdir-sudo-master
Open

keepalived-sync: fix mkdir permission denied in rsync.sh#28687
willjayyyy wants to merge 1 commit intoopenwrt:masterfrom
willjayyyy:fix/keepalived-sync-mkdir-sudo-master

Conversation

@willjayyyy
Copy link

@willjayyyy willjayyyy commented Mar 5, 2026

Maintainer: @feckert

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.

Add sudo to the mkdir command to match the existing sudo rsync usage.

Also update the sudoers configuration in the postinst script to permit /bin/mkdir in addition to /usr/bin/rsync.

Fixes: #28565

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.

Add sudo to the mkdir command to match the existing sudo rsync usage.

Also update the sudoers configuration in the postinst script to permit
/bin/mkdir in addition to /usr/bin/rsync.

Fixes: openwrt#28565
Signed-off-by: willjayyyy <willjayyyy@users.noreply.github.com>
@wehagy
Copy link
Member

wehagy commented Mar 6, 2026

Please add your real name and email to the SoB. Also, don't open new PRs, use the same PR for the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

keepalived-sync: rsync.sh mkdir fails with Permission denied due to missing sudo

2 participants