CC100 and Telegraf - Permission denied /dev/serial

I am running a TIG stack on a cc100 and got an issue with permission for the /dev/ttySTM1 for the Telegraf container.

The container is created with these parameters:

--privileged --user=root --device=/dev/ttySTM1:/dev/serial

telegraf.conf includes this:

  controller = "file:/dev/serial"

Get this error after starting the container:

[inputs.modbus::MID] Error in plugin: permission denied

If I run the following on the cc100 before startering the container everything works until the controller is rebooted :

chmod ugo+rw /dev/ttySTM1

What am I missing? If I use the same paramters (–privileged --user=root --device=/dev/ttySTM1:/dev/serial) on a NodeRed container it works flawlessly. So it must be telegraf that does something strange ?

1 Like

Have a look at this thread, it might be helpful.

That works perfectly if I run NodeRED but seems like telegraf acts differently with the same container parameters :confused:


I have tried that as well, same problem with telegraf :confused:
Very strange issue. Seems like the telegraf container does something wierd

Looks like a user permissions issue… check out this thread for a possible fix.