Sorry, team, another question… In order to run som...
# fleet
Sorry, team, another question… In order to run some commands such as
fleetctl query
fleetctl config
, I have to call sudo. Is there some way for me to make that go away, or is that on purpose?
NPM and permissions can be a little odd at times. Did you have to use
for the install as well?
I did not. I just ran the command…
And some fleetctl commands do not require sudo
oh actually
that’s not true. I do need to run sudo for everything
It might be because I’m using fleetctl from an orbit build that was given to me. It might not have been intended for me to use it in a dev-like way.
Gotcha. It definitely sounds like permissions. I generally use
to install Node and npm. There's some good documentation here. It's specifically focused on errors when installing global packages, but the same idea applies.
Yes it definitely depends on how you install fleetctl. This might fix it:
chmod a+x $(which fleetctl)
@zwass always knows what's what.
Awesome… thanks!
Alright, sorry, so now I’m getting a different permission error.
open /Users/mozhu/.fleet/config: permission denied
So to address this, I ran
chmod a+rw ~/.fleet/config
Now that file is permission 666.
However, when I run a query, it gives me a new error:
File /Users/mozhu/.fleet/config already exists with mode 666 instead of the expected 600
So it seems like it wants me to have a root-only readable config file. But I think that would require me to sudo?
just to catch up, you can run fleetctl as user mozhu now? If you are running fleetctl as mozhu you should be able to set the perms back to 600 on ~/.fleet/config
@Keith Swagler No, because if I run fleetctl as mozhu, I get
Error: error verifying that config exists at /Users/mozhu/.fleet/config: open /Users/mozhu/.fleet/config: permission denied
Ah yeah it seems like all the permissions got created for user
. You'll want to do
sudo chown -R mozhu /Users/mozhu/.fleet/config
That worked! all good now!
👍 1