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

running as unprivileged user doesn't work as documented #81

Open
rotanid opened this issue Mar 2, 2016 · 5 comments
Open

running as unprivileged user doesn't work as documented #81

rotanid opened this issue Mar 2, 2016 · 5 comments

Comments

@rotanid
Copy link

rotanid commented Mar 2, 2016

running ffmap-backend on Debian 8 as unprivileged user doesn't work like it is documented.
as far as i remember it was strange, with the solution from the readme, the alfred socket access wasn't possible most of the time, worked only once in a while

we solved it by

  1. creating wrapper scripts that run batctl, batadv-vis, alfred-json via sudo
  2. create sudo entries for these
  3. change the PATH for the cronjob to include the directory containing the wrapper scripts
  4. change backend.py to copy/use the parent environment variables, see tecff@15553b8 and tecff@a2a5fcb

maybe there's a better way, but the readme should be updated regarding this

@jplitza
Copy link
Member

jplitza commented Mar 2, 2016

In what way "doesn't it work"? Error messages? Log entries?

@rotanid
Copy link
Author

rotanid commented Mar 2, 2016

i had this problem back in november and worked hours to solve it.
sorry, i don't have the time and motivation to go through all this again, so i just shared what i still remember to help others experiencing the same.
i added a few details above that i can remember.

@rotanid
Copy link
Author

rotanid commented Apr 6, 2016

i did some debugging and came to the following results:

  • running the alfred master as "root:alfred" so the socket gets the correct group
  • need to run "chmod g+w /var/run/alfred.sock"

the problem is that the last command isn't persistent...

so there's a simpler solution than the one i described above, but information in the README isn't enough to get ffmap-backend running as an unprivileged user

sidenote:
couldn't get alfred 2015.2 from jessie-backports to work at all, so i'm stuck with 2014.4 - freifunk pinneberg seems to have the same problem (but that's not the issue here imho, just additional information)

@jplitza
Copy link
Member

jplitza commented Apr 6, 2016

Your side note may actually hint at what is the difference in our setups. How/wherefrom did you install alfred? Because I'm using the repository at debian.draic.info by @tcatm, and the version installed from there is automatically run as root:alfred and sets 660 on the socket.

@rotanid
Copy link
Author

rotanid commented Apr 7, 2016

We're running 2014.4 from ffmuc/fpletz repository at the moment, but as the "more official" one in debians repositories also doesn't use root:alfred and 660 we should either work hard to change it there, too or (even better) change it so it doesn't need full root.
short term it should at least be noted that it relies on that specific build/package of alfred

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

No branches or pull requests

2 participants