OpenSIPS / opensips-cli

OpenSIPS CLI tool - an interactive command line tool that can be used to control and monitor OpenSIPS servers.
GNU General Public License v3.0
84 stars 46 forks source link

ERROR: cannot access fifo file /tmp/opensips_fifo #118

Closed NFhook closed 4 months ago

NFhook commented 4 months ago

Server: OpenSIPS Version: 3.4.3 use docker-opensips build image, run in Rocky Linux release 9.3

Client: opensips-cli -x Welcome to OpenSIPS Command Line Interface! (opensips-cli): mi version ERROR: cannot access fifo file /tmp/opensips_fifo: [Errno 13] Permission denied: '/tmp/opensips_fifo' ERROR: starting with Linux kernel 4.19, processes can no longer read from FIFO files ERROR: that are saved in directories with sticky bits (such as /tmp) ERROR: and are not owned by the same user the process runs with. ERROR: To fix this, either store the file in a non-sticky bit directory (such as /var/run/opensips), ERROR: or disable fifo file protection using 'sysctl fs.protected_fifos=0' (NOT RECOMMENDED)

docker exec -it opensips bash

ls /tmp/opensips_fifo -lh

prw-rw-rw- 1 opensips opensips 0 Mar 6 10:32 /tmp/opensips_fifo

NFhook commented 4 months ago

edit opensips.cfg

FIFO Management Interface

loadmodule "mi_fifo.so" modparam("mi_fifo", "fifo_name", "/var/run/opensips/opensips_fifo") modparam("mi_fifo", "fifo_mode", 0666)

edit opensips-cli.cfg fifo_file: /var/run/opensips/opensips_fifo