Access Greengrass logs as non root user

0

Hello all,
I'm trying to read greengrass logs (system or lambda) from program which is not running as root. But all Greengrass logs are owned by root and have access mode 600. Also the path to the logs is also owned by root and have mode 700, which also denies other users from accessing them.

I tried changing the mode of the log files to 644 and directories to 755 but after greengrass restart the original modes are restored. I also tried to setup default ACL to the folder, hoping that new files would inherit the ACLs (which they do) but it seems that Greengrass forcibly changes the mode of new log files which changes the ACL mask to 000, which also denies access to all other users.

Is there a way to modify the mode of log files (or Greengrass write directory in general)? Or is there some hack with would allow to read Greengrass logs?

Thank you very much for the responses

Nuke
질문됨 4년 전252회 조회
2개 답변
0

Hi,

Unfortunately this is not a feature we currently support; though this may be something we could add in a future release.

In the meantime, would you be able to publish your logs to cloudwatch (https://docs.aws.amazon.com/greengrass/latest/developerguide/greengrass-logs-overview.html#config-logs )
and have this non-root program access them from there? This may be a workaround.

Thanks,
AV

AWS
답변함 4년 전
0

Hi,
thank you for the quick answer.

We are currently looking into using named pipes with 644 mode and a process which will copy the logs into this pipe. But CloudWatch might be easier solution.

Atria
답변함 4년 전

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

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

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

관련 콘텐츠