Skip to content

CFE-90: Replaced chown -R of the jenkins home with fixing root owned files - #2421

Merged
nickanderson merged 2 commits into
cfengine:masterfrom
nickanderson:CFE-90/master-3
Aug 12, 2026
Merged

CFE-90: Replaced chown -R of the jenkins home with fixing root owned files#2421
nickanderson merged 2 commits into
cfengine:masterfrom
nickanderson:CFE-90/master-3

Conversation

@nickanderson

@nickanderson nickanderson commented Aug 11, 2026

Copy link
Copy Markdown
Member

The pre-build chown -R jenkins /home/jenkins walked the rootless container store, and chown(2) clears setuid bits even when the owner is unchanged, so /usr/bin/sudo inside stored image layers lost its setuid bit and every container build that reused an image failed. The root owned files it was compensating for were this script's own, left in the jenkins home because it ran from there; it now works in /var/tmp and chowns only what is still root owned, reporting it.

Also reverts e19e324, which addressed the same failure on the wrong premise: the subuid range was already correct on the CI hosts.

This reverts commit e19e324. The range was
already correct on the CI hosts; setuid bits were lost to chown, not to the id
mapping.

Ticket: CFE-90
Changelog: none
chown -R cleared setuid bits, stripping /usr/bin/sudo inside every image in the
rootless container store. The root owned files it existed for were this
script's own: it ran from the jenkins home. Work in /var/tmp instead.

Ticket: CFE-90
Changelog: none
@nickanderson nickanderson changed the title CFE-90: Excluded the rootless container store from chown of jenkins home CFE-90: Replaced chown -R of the jenkins home with fixing root owned files Aug 12, 2026
@nickanderson
nickanderson merged commit cb25aac into cfengine:master Aug 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants