Backblaze / B2_Command_Line_Tool

The command-line tool that gives easy access to all of the capabilities of B2 Cloud Storage
Other
540 stars 123 forks source link

permission denied #842

Closed perochak closed 4 months ago

perochak commented 1 year ago

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

ppolewicz commented 1 year ago

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).

jordantrizz commented 1 year ago

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 commented 4 months ago

Was this ever fixed?

mjurbanski-reef commented 4 months ago

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.