mrlt8 / docker-wyze-bridge

WebRTC/RTSP/RTMP/LL-HLS bridge for Wyze cams in a docker container
GNU Affero General Public License v3.0
2.46k stars 151 forks source link

mtx_event.py breaks for non-root user #1174

Closed GiZZoR closed 1 month ago

GiZZoR commented 1 month ago

I was trying to deploy wyze-bridge manually to a LXC container in proxmox, and noticed that when I tried to run the app as a non-root user I kept getting this error: May 03 15:41:49 wyze-bridge gunicorn[3695]: File "/app/wyzebridge/mtx_event.py", line 56, in open_pipe May 03 15:41:49 wyze-bridge gunicorn[3695]: self.pipe_fd = os.open(self.FIFO, os.O_RDWR | os.O_NONBLOCK) May 03 15:41:49 wyze-bridge gunicorn[3695]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ May 03 15:41:49 wyze-bridge gunicorn[3695]: PermissionError: [Errno 13] Permission denied: '/tmp/mtx_event'

I might be wrong, but I think the usage of os.mkfifo here seems incorrect. As far as I can tell, os.mkfifo expects a "mode" and not the "flags" from os.open.

Is there some reason for not changing os.mkfifo(self.FIFO, os.O_RDWR | os.O_NONBLOCK) to simply os.mkfifo(self.FIFO)?

mrlt8 commented 1 month ago

hmmm, I think you're right. could you try the latest dev branch?

GiZZoR commented 1 month ago

Cloned dev branch this morning. Can confirm that it's working. Thanks!