feat: add optional --no-permission-change to skip rsync permission preservation#355
Merged
greenbonebot merged 2 commits intoJun 17, 2026
Merged
Conversation
Add an opt-in --no-perms flag (config `no-perms`, env GREENBONE_FEED_SYNC_NO_PERMS) that makes rsync pass `--no-perms` instead of the default `--perms --chmod=...`. The default behavior is unchanged and covered by tests. Useful when syncing to storage that denies changing permissions. Co-authored-by: AI (copilot/full)
Conventional Commits Report😢 No conventional commits found. 👉 Learn more about the conventional commits usage at Greenbone. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #355 +/- ##
=======================================
Coverage 99.35% 99.36%
=======================================
Files 7 7
Lines 468 470 +2
=======================================
+ Hits 465 467 +2
Misses 3 3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bjoernricks
reviewed
Jun 16, 2026
bjoernricks
left a comment
Contributor
There was a problem hiding this comment.
Could you make the CLI argument more descriptive? For example --no-permission-change, --keep-permissions or similar.
bjoernricks
reviewed
Jun 16, 2026
Make the rsync permission CLI flag self-explanatory and align the Rsync parameter with it: - CLI flag --no-perms -> --no-permission-change - env var GREENBONE_FEED_SYNC_NO_PERMS -> GREENBONE_FEED_SYNC_NO_PERMISSION_CHANGE - config key no-perms -> no-permission-change - Rsync(perms=...) -> Rsync(change_permissions=...) Also align the README description with the parser help wording and unify the storage examples. The underlying rsync --no-perms option string is unchanged. Co-authored-by: AI (copilot/partial)
auto-merge was automatically disabled
June 17, 2026 09:15
Head branch was pushed to by a user without write access
bjoernricks
approved these changes
Jun 17, 2026
Contributor
Author
@bjoernricks Updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Some storage backends (bind mounts, network filesystems, container volumes) allow writing files but reject changing their modes. The sync currently always passes
--perms --chmod=Fugo+r,Fug+w,Dugo-s,Dugo+rx,Dug+w, which makes rsync fail with a permission error on such targets.What
--no-permission-changeCLI flag,no-permission-changeconfig variable, andGREENBONE_FEED_SYNC_NO_PERMISSION_CHANGEenvironment variable.--no-permsinstead of the default--perms --chmod=....Rsync(change_permissions=...)frommain.py; documented inREADME.md.Tests
main.pywiring.main.pytests updated to assert the defaultchange_permissions=True.ruff checkandruff formatclean.Includes AI-generated code (GitHub Copilot).