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_pipeMay 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)?
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 simplyos.mkfifo(self.FIFO)
?