-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't authorize_account as user, must be root #415
Comments
It seems that you authorized successfully on the root account, but did not on your user account. Are you 100% sure the auth data was the same in both cases? Perhaps you have a WAF, transparent proxy server or environment variables set, that affect http queries done from your user account? |
Does the regular user have access to write to a home directory? The B2 command line tool persists it's credentials in a file called ~/.b2_account_info. |
Same result in a new shell with fresh, standard environment variables. The actual error is:
So, if the error message is correct, it is the auth token that b2 is generating that is invalid. Two things:
I had sort of assumed this was common and I did something wrong. If this is non-trivial, I think I'll delete the bucket and purge the install, then start again with a fresh blank setup. It's only bandwidth, the files themselves were uploaded while testing out B2 and are only backups. |
Have you tried removing You could also try adding the
|
Closing. Please re-open if fixing the permissions on |
I was never able to solve this. My backup program (restic) has its own
backend to B2 which makes the situation manageable, if not
ideal. Occasionally I would like to have the ability to access through
a shell, but no luck I'm afraid.
…On Wed, 2018-12-12 at 01:13 -0800, John Robson wrote:
I'm with the same error: ERROR: unable to authorize account: Invalid
authorization token. Server said: (bad_auth_token)
I deleted "~/.b2_account_info", I used "sudo" and didn't work.
I'm using Linux: and backblaze-b2 1.3.6-1
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c5
5493e4bb","name":"GitHub"},"entity":{"external_key":"github/Backblaze
/B2_Command_Line_Tool","title":"Backblaze/B2_Command_Line_Tool","subt
itle":"GitHub repository","main_image_url":"https://assets-cdn.github
.com/images/email/message_cards/header.png","avatar_image_url":"https
://assets-
cdn.github.com/images/email/message_cards/avatar.png","action":{"name
":"Open in GitHub","url":"https://github.com/Backblaze/B2_Command_Lin
***@***.***
son in #415: I'm with the same error: ERROR: unable to authorize
account: Invalid authorization token. Server
said: (bad_auth_token)\r\n\r\nI deleted \"~/.b2_account_info\", I
used \"sudo\" and didn't work.\r\n\r\nI'm using Linux: and backblaze-
b2 1.3.6-1"}],"action":{"name":"View Issue","url":"https://github.com
/Backblaze/B2_Command_Line_Tool/issues/415#issuecomment-446515817"}}}
[
{
***@***.***": "http://schema.org",
***@***.***": "EmailMessage",
"potentialAction": {
***@***.***": "ViewAction",
"target": "#4
15#issuecomment-446515817",
"url": "#415#
issuecomment-446515817",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
***@***.***": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]
|
authorize_account is working. $ b2 authorize_account xxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx if you read your files with sudo, you need to authorize with sudo too. |
First time install, first as Debian Stretch
apt install
, then, when that did not authorize, I removed it and installed bypip install
on the basis that the newest version should be the best (the versions were in fact the same).Problem
b2 can
authorize_account
successfully only if run as root. When run as a normal user, it fails. This means nothing can be done as a user, sinceauthorize_account
is needed before doing anything else.Example (note when using
sudo
it works):It is not a key problem. The third-party backup application restic works successfully with the keys.
I want to automate the process in a script, so
sudo
isn't really a solution.The text was updated successfully, but these errors were encountered: