Giter VIP home page Giter VIP logo

Comments (4)

tralph3 avatar tralph3 commented on June 12, 2024

So, in order to grant access to a regular user to ZeroTier, you need to have the authorization token in your home folder. The program should check if you have it, and create it if you don't. For this, it asks you for root permission with pkexec, here's the relevant piece of code:

system( f'pkexec bash -c "cp /var/lib/zerotier-one/authtoken.secret '\
    f'/home/{username}/.zeroTierOneAuthToken && chown {username} '\
    f'/home/{username}/.zeroTierOneAuthToken && chmod 0600 '\
    f'/home/{username}/.zeroTierOneAuthToken"'
)

As you can see, all it does is copy that file and give you permissions.

Now, you say pkexec isn't working with the program, but it does work with the terminal. Does running the GUI through the terminal show any other error? Maybe it's failing somehow.

from zerotier-gui.

wpinacz avatar wpinacz commented on June 12, 2024

So, in order to grant access to a regular user to ZeroTier, you need to have the authorization token in your home folder. The program should check if you have it, and create it if you don't. For this, it asks you for root permission with pkexec, here's the relevant piece of code:

system( f'pkexec bash -c "cp /var/lib/zerotier-one/authtoken.secret '\
    f'/home/{username}/.zeroTierOneAuthToken && chown {username} '\
    f'/home/{username}/.zeroTierOneAuthToken && chmod 0600 '\
    f'/home/{username}/.zeroTierOneAuthToken"'
)

As you can see, all it does is copy that file and give you permissions.

Now, you say pkexec isn't working with the program, but it does work with the terminal. Does running the GUI through the terminal show any other error? Maybe it's failing somehow.

Hi,
now it works, without pkexec.... in .desktop file.
I think I saw somewhere on zertier support site that versions above ~1.6.0 have changed root privileges policy, earlier I had zerotier (below 1.6.0) with zerotier-gui on another pc (same ubuntu 20.04) and worked without a hassle.
Maybe there should be Yours script included in Install.sh or included 2nd .....fix_root_permissions.sh into installer so any1 else could easy fix same problems.
Anyway problem fixed.
Thank You for Your support.

Regards.

from zerotier-gui.

tralph3 avatar tralph3 commented on June 12, 2024

What would be the new root privileges policy?

from zerotier-gui.

wpinacz avatar wpinacz commented on June 12, 2024

What would be the new root privileges policy?

Sorry, it wasnt on zerotier support, it was here on github, the problem exists in >= 1.4.0
Here's the link:
zerotier/ZeroTierOne#996

It's just the policy for normal users, just what Your script does fixing problem.

from zerotier-gui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.