From 5d19ff5fe919da438cf49bc8de92015156d9eaec Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Sat, 16 Dec 2023 17:14:02 +0100 Subject: live: validate rw access to image folder after remount check that it is readable and writable --- src/live/ogOperations.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/live/ogOperations.py b/src/live/ogOperations.py index ff1a099..1747364 100644 --- a/src/live/ogOperations.py +++ b/src/live/ogOperations.py @@ -442,6 +442,11 @@ class OgLiveOperations: raise ValueError('Target partition has no filesystem present') cambiar_acceso(user=self._smb_user, pwd=self._smb_pass) + + if os.access(f'/opt/opengnsys/images', os.R_OK | os.W_OK) == False: + logging.error('Cannot open /opt/opengnsys/images') + raise ValueError('Cannot access image folder') + ogCopyEfiBootLoader(disk, partition) ogReduceFs(disk, partition) -- cgit v1.2.3-18-g5258