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
질문됨 3년 전611회 조회
2개 답변
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
전문가
답변함 3년 전
0

Yeah, that was it. Thank you very much!

jcai
답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠