- Newest
- Most votes
- Most comments
Hello,
Just because you have access to the file does not necessarily mean that Stream manager has access to the file, given the error you're seeing. Try writing the file to a guaranteed permissions-open path such as /tmp.
Take note that on Linux, file system permissions are required for every part of the path, not just the file. If you write a file to a/b/c, then the reader needs execute permission on directory a and directory b and then read permission on the file c.
Unless you have changed the configuration, Stream manager will be running as the user ggc_user, so that user must have the appropriate permissions to read the files.
You may change the user that a component runs as in a deployment by setting the runWith option. https://docs.aws.amazon.com/greengrass/v2/developerguide/create-deployments.html
Cheers,
Michael
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago
Thank you for such a quick reponse. To clarify:
the 3rd container is listening on port 8088. it does not need access to the file. Right? "Stream manager " is running in the nucleus. I bet the port 8088 is just for signaling and the 3rd container needs access to the file.
The permissions of the directory on the host are "drwxr-xr-x". The SDK is in the 2nd container. inside the container the directory permissions are "drwxr-xr-x." the container is running as privileged and root.
Containers are going to make this extremely complex. I cannot recommend that you do that.
You can probably make this work, but I won't be able to help you with that. Just keep in mind what users exist both in and out of the container, what volumes are mounted, and what permissions are for those mounts and the files within.
Files are not transferred over the HTTP connection (port 8088), that's why you provide a file path and not the file itself. Stream manager needs access to the file path that you tell it to read.
Perfect. It worked! The nucleus component needs access to the file! as you confirmed above. if you could influence the Documentation which is already good just needs to make clear two more things:
and for bonus: https://github.com/aws-greengrass/aws-greengrass-stream-manager-sdk-python/tree/main is to be used and not https://github.com/aws/aws-iot-device-sdk-python-v2 or https://github.com/aws/aws-greengrass-core-sdk-python
Glad it is working for you!