Skip to content
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

authorzation failed while the file is being uploaded with the argument --incremental-mode #1057

Open
stupidloud opened this issue Nov 8, 2024 · 5 comments
Labels

Comments

@stupidloud
Copy link

stupidloud commented Nov 8, 2024

ERROR: unauthorized for application key with capabilities 'writeBucketEncryption,readBucketReplications,listAllBucketNames,writeFiles,readBucketEncryption,writeBucketReplications,readFiles,listFiles,listBuckets,readBuckets,deleteFiles,shareFiles', restricted to bucket 'bucketname1' (None)

sometimes my bucket has unfinished uploading large files, I always manually deleted them.
I assume --incremental-mode has a capability to append data to the these files, instead of adding another version.
but the uploading is failed with the message on the first line.

@ppolewicz
Copy link
Collaborator

Hi,

thank you for the bug report. This is not supposed to happen. Have you deleted the unfinished large file as the CLI was uploading the affected file?

@stupidloud
Copy link
Author

I updated the command b2v4 from 4.1 to 4.2, now I cannot reproduce this issue.
but a new file version was still added while --incremental-mode is used.
the procedure:

  1. b2 file upload --incremental-mode --threads 4 --sha1 9ae4aeab1a128b361c3825fb3c0c550b9bef332e testbk0 filevov1306 00498f907da83
  2. manually CTRL+C to interrupt the upload
  3. re-ran b2 file upload --incremental-mode --threads 4 --sha1 9ae4aeab1a128b361c3825fb3c0c550b9bef332e testbk0 filevov1306 00498f907da83 and wait the completion
  4. two 00498f907da83 were found on b2 server and one of the them is un-finished

@stupidloud
Copy link
Author

This bug is still there.
After uploaded a few files, each upload command (same arguments but different files) produced the same error.
It's not second upload attempt.
Each fresh upload had this error.

@ppolewicz
Copy link
Collaborator

Hey,

I'm slightly confused. Is the problem that you are getting an "authorization error", or that the upload session is not continued from where it left off? Or maybe it's both?

@ppolewicz ppolewicz added the bug label Nov 21, 2024
@stupidloud
Copy link
Author

I am getting an "authorization error", but not always.
I wrote a script to watch a directory, to upload files which were put into.
After a few files were successfully uploaded, the upload command continuously reported this error message.
To identify the reason, I logined to the b2 web console, confirmed that there is no unfinished parts of those files which referenced.

I think the error is related to your server. And I think you should continuously upload a few files to reproduce this error.

To resolve, I remove --incremental-mode from the command line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants