GNOME Bugzilla – Bug 738954
repo: When writing to a non-root owned repo, chown() objects to match
Last modified: 2018-08-17 18:58:23 UTC
Some package systems need to be run as root, so the process linking to libostree may also be root. However, it's reasonable to have the target repository be owned by a uid other than root. This patch makes it Just Work by chowning the file content to match.
Created attachment 289067 [details] [review] repo: When writing to a non-root owned repo, chown() objects to match
Review of attachment 289067 [details] [review]: Patch looks good to me as is. I did have to take a moment to lookup why this is only applicable to "archive-z2" mode, but it makes sense now. Maybe worth mentioning this at least in the commit message for posterity?
Attachment 289067 [details] pushed as 5fb8bb9 - repo: When writing to a non-root owned repo, chown() objects to match
We also need to do this for refs and in general any other data we write (such as the summary file, etc.)
I started on parts of this in https://github.com/GNOME/ostree/pull/88
I now think this is better addressed in https://github.com/projectatomic/rpm-ostree/issues/129
OSTree has moved to Github a while ago. Furthermore, GNOME Bugzilla will be shut down and replaced by gitlab.gnome.org. If the problem reported in this Bugzilla ticket is still valid, please report it to https://github.com/ostreedev/ostree/issues instead. Thank you! Closing this report as WONTFIX as part of Bugzilla Housekeeping.