Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Modbus RTU error] Port [ttyUSB0] Permission denied: '/dev/ttyUSB0' #1396

Closed
pro100805 opened this issue May 13, 2024 · 2 comments
Closed

[Modbus RTU error] Port [ttyUSB0] Permission denied: '/dev/ttyUSB0' #1396

pro100805 opened this issue May 13, 2024 · 2 comments

Comments

@pro100805
Copy link

● thingsboard-gateway.service - ThingsBoard Gateway
Loaded: loaded (/etc/systemd/system/thingsboard-gateway.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2024-05-13 09:19:30 CEST; 21s ago
Main PID: 16644 (python3)
Tasks: 21 (limit: 2219)
Memory: 58.8M
CPU: 4.642s
CGroup: /system.slice/thingsboard-gateway.service
└─16644 /usr/bin/python3 -c "from thingsboard_gateway.tb_gateway import daemon; daemon()"

May 13 09:19:44 tb-gw-server python3[16644]: 2024-05-13 09:19:44 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:44 tb-gw-server python3[16644]: 2024-05-13 09:19:44 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:44 tb-gw-server python3[16644]: 2024-05-13 09:19:44 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:49 tb-gw-server python3[16644]: 2024-05-13 09:19:49 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:49 tb-gw-server python3[16644]: 2024-05-13 09:19:49 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:49 tb-gw-server python3[16644]: 2024-05-13 09:19:49 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:49 tb-gw-server python3[16644]: 2024-05-13 09:19:49 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:49 tb-gw-server python3[16644]: 2024-05-13 09:19:49 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:49 tb-gw-server python3[16644]: 2024-05-13 09:19:49 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'
May 13 09:19:49 tb-gw-server python3[16644]: 2024-05-13 09:19:49 - |ERROR| - [serial.py] - serial - connect - 221 - [Errno 13] could not open port /dev/ttyUSB0: [Errno 13] Permission denied: '/dev/ttyUSB0'

@imbeacon
Copy link
Member

Hi @pro100805,

Please try to add user thingsboard_gateway to group dial out and restart a machine.

To do this you can use the following command:
sudo adduser thingsboard_gateway dialout

@pro100805
Copy link
Author

Good evening, everything works fine, thanks for the quick help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants