diff options
author | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-06-27 11:56:10 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-06-27 12:16:14 +0200 |
commit | 43039749c50a4fadd085418e262a50ea0d4f1357 (patch) | |
tree | a8d474cf7864b7e4cba9b8d0d54c810f2120c876 /src/live/ogOperations.py | |
parent | a9d8cdd210234b2d295c7a3e342cf2bd3f48f45f (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.py | 4 |
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): |