I am working on an Azure Batch job where I need to access files mounted at a specific directory path. However, I am encountering a "Permission Denied" error when trying to access these files. The files are mounted from storage account - which is done when creating a Batch Pool.
I have a directory mounted at /mnt/batch/tasks/fsmounts/test. When I for example run the command line "ls /mnt/batch/tasks/fsmounts/test" from a job task, I get the following error message:
ls: cannot access '/mnt/batch/tasks/fsmounts/test': Permission denied
From the Pool node I've verified that the files are indeed mounted in the fsmounts folder, but I'm having trouble accessing them from a job task. I am able to access other files in the fsmounts folder.
I've tried differenct approach in the mount configuration - using access key, SAS key, and Identity reference
Has anyone experienced something similar? All help is appreciated.
As per the Azure Batch Virtual Filesystem documentation for Azure Blob Containers, the mount is most likely restricted to
rootonly:You are probably running your tasks with lower privilege than the mount. If your scenario allows lower privileged users to access the blob container, then you most likely need to specify
-o allow_otherunderBlobfuseOptionsas part of theMountConfiguration. If not, you will need to elevate your tasks to run as admin (i.e.,root).