Permission denied trying to import from another component

0

I have a python component that is depended on another component. I set the path of the dependent in an environment variable in my recipe. At the beginning of my script, I add the path to my sys.path so I can find and import the module I needed. This all works fine during local deployment. But when I tried to deploy to another device (raspberry pi) from IoT console, the deployment failed. I get "PermissionError: [Errno 13] Permission denied: ..." on the file I am trying to import. I checked the files inside /greengrass/v2/packages, they are all under root with only read permissions (444). On my local machine, the files are also under root and with permission 644. It seems that this should not make any difference. Any idea this is not working? Thank you in advance!

jcai
preguntada hace 3 años618 visualizaciones
2 Respuestas
0

Hi,
Different components won't have permission to read each others artifacts because they might be running as different users. When deploying a component you get to select what user each components runs as, and if they aren't the same then it won't have permissions to read it. You can address this by setting the permissions on the artifact within the recipe file such that everyone is allowed to read it. https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html

Cheers,
Michael Dombrowski

AWS
EXPERTO
respondido hace 3 años
0

Yeah, that was it. Thank you very much!

jcai
respondido hace 3 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas