summaryrefslogtreecommitdiffstats
path: root/src/live/ogOperations.py
diff options
context:
space:
mode:
authorOpenGnSys Support Team <soporte-og@soleta.eu>2024-06-27 11:56:10 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2024-06-27 12:16:14 +0200
commit43039749c50a4fadd085418e262a50ea0d4f1357 (patch)
treea8d474cf7864b7e4cba9b8d0d54c810f2120c876 /src/live/ogOperations.py
parenta9d8cdd210234b2d295c7a3e342cf2bd3f48f45f (diff)
live: check permissions when trying to fetch file via unicastv1.3.2-12
check sufficient permissions and bail out in case of issues.
Diffstat (limited to 'src/live/ogOperations.py')
-rw-r--r--src/live/ogOperations.py4
1 files changed, 4 insertions, 0 deletions
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):