I am running a python app within a docker container, that apps seems to be running properly, However when I reach the point where the app write to a file inside container (/app/data/somefile.txt, which is mapped to a volume on my host machine) I get an error which basically states that I dont have permission to write.
Exception has occurred: PermissionError
[Errno 13] Permission denied: ‘/modbus-client-influxdb/data/version.txt’
How can i write this file and then perisist the data on torizon host.
I am creating the data folder with python so it should have the same permissions as main.py it seems that somehow the created folder requires root privilages
I used a volume mount inside the app which I think already has a bind mount. so the app you create on the host pc already has a bind mount on your board. creating a named volume creates a directory on host with root permissions so my python app was not able to access it due to less permissions. removed the volume mount and it started working.