From 43039749c50a4fadd085418e262a50ea0d4f1357 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 27 Jun 2024 11:56:10 +0200 Subject: live: check permissions when trying to fetch file via unicast check sufficient permissions and bail out in case of issues. --- src/live/ogOperations.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index 7d0d832..2d5146c 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -201,7 +201,11 @@ class OgLiveOperations: not tip_check_csum(repo, name)): self._copy_image_to_cache(name) else: + if os.access(f'/opt/opengnsys/images', os.R_OK) == False: + raise OgError('Cannot access /opt/opengnsys/images in read mode, check permissions') + image_path = f'/opt/opengnsys/images/{name}.img' + self._restore_image(image_path, devpath) def _restore_image_tiptorrent(self, repo, name, devpath): -- cgit v1.2.3-18-g5258