Cloudwatch agent not able to start: permission denied

54 Views Asked by At

I am trying to configure cloudwatch on lightsail instance but when i try to start cloudwatch with

sudo amazon-cloudwatch-agent-ctl -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json -a fetch-config -s

i get below permission denied error

E! [telegraf] Error running agent: Error loading config file /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml: open /opt/aws/amazon-cloudwatch-agent/etc/amazon-cloudwatch-agent.toml: permission denied

although I have assigned relavant permission from dir to file still facing this issue

0

There are 0 best solutions below