I am currently setting up rtpproxy in RHEL 7, and when I tested in in ubuntu, it runs without any problem. From what I observe, I think the problem is mainly due to the permission of /var/run/; the service fails to start and logs this error:

rtpproxy: can't bind to a socket: /var/run/rtpproxy.sock: Permission denied

Is there any way to change the way rtpproxy run with /var/run/rtpproxy/ rather than /var/run/ ?

rtpproxy can't bind to a socket: /var/run/rtpproxy.sock: Permission Denied

1 Answer 1


From the docs

-s ctrl_socket

This parameter configures rtpproxy control socket. The control socket is used by the call controller for the purpose of creating, modifying, and deleting RTP sessions. The control socket can also be used to fetch stats from the rtpproxy process, or about specific media sessions. Format of ctrl_socket is :. Following types are supported

You probably need to edit /etc/systemd/system/rtpproxy.service or, if this is not existant, copy it over from /usr/lib/systemd/system/rtpproxy.service and edit it then.

Sadly the part for the config file is missing from the docs, and as I can't install rtpproxy atm, I can't help you with that.

EDIT: I don't think that rtpproxy will actually start, even after that edit, because if the service can't create the socket in cause of wrong permissions, it probably can't create a subdirectory either...

  • 1
    Regarding your second paragraph, systemctl edit can be used to do the right thing in all cases. Mar 4, 2021 at 8:36
  • I already edited it via systemctl edit and vi, but still the error is persist, and the folder is not pointing to subdirectory which "var/run/rtpproxy/" but still in "var/run" Mar 4, 2021 at 12:21
  • 1
    Did you run systemctl daemon-reload after modifying the systemd service?
    – jsbillings
    Mar 7, 2021 at 19:39
  • Yep, I did, but still failed Mar 16, 2021 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.