Sorry, team, another question… In order to run som...
# fleet
m
Sorry, team, another question… In order to run some commands such as
fleetctl query
or
fleetctl config
, I have to call sudo. Is there some way for me to make that go away, or is that on purpose?
k
NPM and permissions can be a little odd at times. Did you have to use
sudo
for the install as well?
m
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.
k
Gotcha. It definitely sounds like permissions. I generally use
nvm
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.
z
Yes it definitely depends on how you install fleetctl. This might fix it:
chmod a+x $(which fleetctl)
.
k
^
@zwass always knows what's what.
m
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?
k
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
m
@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
z
Ah yeah it seems like all the permissions got created for user
root
. You'll want to do
sudo chown -R mozhu /Users/mozhu/.fleet/config
.
m
That worked! all good now!
👍 1