You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Image Builder requires root permissions for many tasks (but not all). This is due to needing root permissions to do any disk mounting.
However, image-builder-clialways needs root permissions due to trying to create a directory in /var/cache.
If we're going down that route then perhaps we should add a geteuid() check and exit earlier. Right now it takes (on my system) 10-15 seconds before we get to the point of error:
user@muja ~ € image-builder build iot-commit
No distro name specified, selecting "fedora-41" based on host, use --distro to overrideWARN[0000] Failed to load consumer certs: no consumer key found
Traceback (most recent call last):
File "/usr/bin/osbuild", line 33, in <module>
sys.exit(load_entry_point('osbuild==138', 'console_scripts', 'osbuild')())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/osbuild/main_cli.py", line 171, in osbuild_cli
with ObjectStore(args.store) as object_store:
~~~~~~~~~~~^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/osbuild/objectstore.py", line 325, in __init__
os.makedirs(self.store, exist_ok=True)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen os>", line 217, in makedirs
File "<frozen os>", line 227, in makedirs
PermissionError: [Errno 13] Permission denied: '/var/cache/image-builder'
error: running osbuild failed: exit status 1
Alternatively, we might want to tag the various image types with if they require root permissions and handle the cache differently.
The text was updated successfully, but these errors were encountered:
Image Builder requires root permissions for many tasks (but not all). This is due to needing root permissions to do any disk mounting.
However,
image-builder-cli
always needs root permissions due to trying to create a directory in/var/cache
.If we're going down that route then perhaps we should add a
geteuid()
check and exit earlier. Right now it takes (on my system) 10-15 seconds before we get to the point of error:Alternatively, we might want to tag the various image types with if they require root permissions and handle the cache differently.
The text was updated successfully, but these errors were encountered: