Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to connect to socket /var/run/lldpd.socket: Permission denied while running commandline: lldpcli -f json show neighbors #452

Open
nightwalker007 opened this issue Jun 17, 2021 · 2 comments
Labels

Comments

@nightwalker007
Copy link

Reproduce Steps:

  1. Get the latest installation package for macos(pkg installation method) and install it, My mac os version is 11.4 Big Sur
  2. run command 'lldpcli -f json show neighbors' and you will get the socket error like above

This is the ls output of the socket file "srwxrwx--- 1 _lldpd _lldpd 0 6 17 09:08 /var/run/lldpd.socket", it shows that other user can not read/write the socket and i think that is the reason

I can workround this issue by adding sudo, however, shouldn't we add current user to _lldpd group during installation??

@vincentbernat
Copy link
Member

The way it work is that the lldpcli binary is setuid _lldpd and you need to be in the group of this binary:

 11:22 ❱ ls -ltrhA /sbin/lldpcli
-rwsr-x--- 1 _lldpd adm 111K May  1 19:53 /sbin/lldpcli

I don't remember if on MacOS, lldpcli is setuid or not. Could you check?

@staze
Copy link

staze commented Feb 11, 2022

This works for me using the Microsoft packaged lldpd...

https://www.microsoft.com/en-us/download/details.aspx?id=103383

Package includes post-install script to create user, add launchd plist, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants