Permissions required by balena-cli in macOS


We are having problems finding exactly which permissions some of our technicians are missing in their computers.

When executing balena login, they get the following error:

Running with sudo works but we would prefer to avoid it

Hey @pablo.burgos , are the technicians able to select any of the provided login methods, or is the error presented before they can select one?

I would start by checking the 1st and 3rd answers in this troubleshooting FAQ where it mentions where some files are stored on disk.

Make sure your technicians accounts have access to write to these locations. Also check that BALENARC_DATA_DIRECTORY hasn’t been set to a path they cannot write to.

Hi @klutchell !

They can select the log in method, the error triggers after they click on the Web Authentication option, and click “Authorize” in the web.

The account they are using to Authorize has “MEMBER-DEVELOPER” role.

I don’t see the file .balenarc.yml. I’m not sure about this file since I don’t find it in my computer either.
The user has writing permissions in $HOME.
$BALENARC_DATA_DIRECTORY is not set, but setting it to an available path does not work either.

Running the command with sudo does fix the issue, but we would like to avoid this. Is there a way to get a more verbose output from the command? It does look like it’s trying to write something somewhere (probably a token in that file).

I found the issue! for some reason the .balena directory was created by root whenever they run it first time. I deleted the directory and run it again and now it works. I’m going to try this in the rest of computers and if so we can set this as solved :slight_smile:

1 Like