Skip to content

Conversation

@d-fence
Copy link
Contributor

@d-fence d-fence commented Oct 10, 2025

When trying to garbaged collect diretories if a file or a directory that the runbot user process own is not writable for the owner, the garbage collecting fails.

The worst case is when both a file and its parent directory are not writable by the user. In that case, even by changing the file permission, the runbot cannot remove the file because of the directory not being writable.

With this commit, a new rmforest function is made that tries, in case of permission error, to change the owner permission of the file and its parent directory to being writable before retrying to unlink them.

@C3POdoo C3POdoo requested a review from a team October 10, 2025 08:43
@d-fence d-fence changed the base branch from 18.0 to 19.0 October 21, 2025 08:56
@d-fence d-fence force-pushed the 18.0-fix-rmtree-issue-moc branch from f3e9bec to d622a62 Compare October 21, 2025 09:20
@d-fence d-fence force-pushed the 18.0-fix-rmtree-issue-moc branch from d622a62 to 1b91693 Compare October 24, 2025 07:14
When trying to garbaged collect diretories if a file or a directory
that the runbot user process own is not writable for the owner, the
garbage collecting fails.

The worst case is when both a file and its parent directory are not
writable by the user. In that case, even by changing the file
permission, the runbot cannot remove the file because of the directory
not being writable.

With this commit, a new `rmforest` function is made that tries, in case
of permission error, to change the owner permission of the file and its
parent directory to being writable before retrying to unlink them.
@d-fence d-fence force-pushed the 18.0-fix-rmtree-issue-moc branch from 1b91693 to 47d67c8 Compare October 31, 2025 15:15
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.

3 participants