B2_Command_Line_Tool icon indicating copy to clipboard operation
B2_Command_Line_Tool copied to clipboard

permission denied

Open perochak opened this issue 2 years ago • 2 comments

Hi

I am using tool like below

wget -q https://github.com/Backblaze/B2_Command_Line_Tool/releases/latest/download/b2-linux -O /usr/bin/backblaze chmod +x /usr/bin/backblaze

backblaze authorize-account xxx xxx

and it gives error

Failed to execv() /tmp/staticx-pDHABe/b2: Permission denied

Any help

perochak avatar Dec 15 '22 08:12 perochak

You are trying to run it on a system that doesn't allow the pre-packaged linux binary release to unpack and run it's temporary files in /tmp. You should either allow it to write to and and execute in /tmp or you should use a different release (for example the one from pip, which is a bit faster anyway).

ppolewicz avatar Dec 15 '22 14:12 ppolewicz

You could also recompile b2 with pyinstaller and use --runtime-tmpdir https://pyinstaller.org/en/v3.6/operating-mode.html?highlight=%2Ftmp#how-the-one-file-program-works

Depending on the CI pipeline, this should be possible. Just need to come up with a standard path for temporary files :(

jordantrizz avatar Jun 10 '23 05:06 jordantrizz

Was this ever fixed?

jordantrizz avatar May 08 '24 16:05 jordantrizz

The workaround mentioned by you is one of possible "fixes".

This is an environment-specific issue and other than changing system configuration, it shares the same workarounds as those listed in https://github.com/Backblaze/B2_Command_Line_Tool/issues/999#issue-2173252304 .

There are currently no plans to change how standalone binary is done, but we do offer other b2 CLI options that will not suffer from this problem if for some reason mentioned workaround is not acceptable.

mjurbanski-reef avatar May 08 '24 17:05 mjurbanski-reef