That's a misconception. The socket is read-only on the application level, i.e. you can't issue any SET commands via it. However, the socket special file itself has to be read-write, because pmc needs bidirectional communication with the running ptp4l instance. Make it rw and it should work. Or even beter, use /var/run/ptp4lro which already has these permissions.

Martin

Dne 3.10.2022 v 19:02 Rich Schmidt napsal(a):

I find that I still have to sudo to run pmc -u,  even if I make the server socket /var/run/ptp4l...  permissions rw-rw-r--

Rich Schmidt
Precise Time Dept
US Naval Observatory
Washington, DC

On Mon, Oct 3, 2022 at 9:56 AM Martin Pecka <pecka...@fel.cvut.cz> wrote:

    Hi Jason, that's what the readonly UDS socket is for. With default
    configuration and PTP4L master branch, this is how you can query
    TIME_STATUS_NP without root:

    pmc -u -s /var/run/ptp4lro -i /tmp/pmc.socket "GET TIME_STATUS_NP"

    The key is to supply the "-s /var/run/ptp4lro" which points to the
    read-only socket. You also need to pass "-i /tmp/pmc.socket" or
    something similar - this points to the path where PMC should
    create its own socket. By default, it is /var/run/pmc.$pid, but
    that location is not writable for non-root users. So I just
    usually point it to /tmp (this socket is practically useless).

    Martin

    --
    Mgr. Martin Pecka, Ph.D.
    Researcher at Vision for Robotics and Autonomous Systems group
    Faculty of Electrical Engineering
    Czech Technical University in Prague
    Phone: +420 22435 7269

    _______________________________________________
    Linuxptp-users mailing list
    Linuxptp-users@lists.sourceforge.net
    https://lists.sourceforge.net/lists/listinfo/linuxptp-users



--

/"We learn from history that we learn nothing from history." /
*George Bernard Shaw
*
*
*
“The ideal subject of totalitarian rule is not the convinced Nazi or the convinced communist, but people for whom the distinction between fact and fiction . . . and the distinction between true and false . . . no longer exist.” —Hanna Arendt, “The Origins of Totalitarianism” (1951)


--
Mgr. Martin Pecka, Ph.D.
Researcher at Vision for Robotics and Autonomous Systems group
Faculty of Electrical Engineering
Czech Technical University in Prague
Phone: +420 22435 7269

Attachment: smime.p7s
Description: Elektronicky podpis S/MIME

_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to