B2_Command_Line_Tool
B2_Command_Line_Tool copied to clipboard
permission denied
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
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).
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 :(
Was this ever fixed?
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.