-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Encryption not working with S3 object storage as primary storage #11826
Comments
GitMate.io thinks possibly related issues are #10455 (File upload fails with encryption on s3 storage "ObjectUpload not found"), #3294 (No Previews/Thumbnails with Primary Storage S3 + Encryption), #3748 (Primary S3 Storage Backend + Encryption problem with file size, mimetype and first download failed), #6113 (S3 won't connect as external storage), and #8617 (Previews not working when using external AWS S3 storage and encryption). |
Looks similar to #10767 |
cc @nextcloud/encryption |
I'm having the same issue with same log entries. Ubuntu 16.04, Nextcloud 14.0.3, apache 2.4.34. I tried to upload from android app and from web ui, same results. Upload is ok but the file can not be previewed or opened after downloading. I'm using wasabi s3 as external storage. |
Now that NC 15.0 is out: My workflow is I set up Nextcloud to the point where the admin user is created and the database connection is specified. I then edit config.php with my S3 storage array. Back-end is minio.
|
Hey guys, I decided to look into this problem because I really wanted to use encryption on S3 object storage. I wrote down my notes and a possible fix in #14027. Maybe someone wants to give it a try? I'd love to get this fixed in a future version of NC. Also more input is appreciated, maybe someone can come up with a better solution. |
Wish there was more traction on this issue since it seems pretty severe. I think if anything, enabling encryption on an instance that has an objectstore with a class of '\OC\Files\ObjectStore\S3' should fail or give a warning stating the unstable nature of encryption on such an objectstore. I'd like to look more into this issue as well, will have to brush up on my php skills. Sorry if my tone is a little negative, just learned of this issue after uploading 100GB of data, only to find it's now essentially garbage. |
I will have a look at #14027. |
Just confirming, issue is still present on NC17. |
This seems to still occur with NC18 as well |
I just ran into this on a new NC 18.04 install |
Same issue with version 19 |
Let us track this in #22077 |
Steps to reproduce
Expected behaviour
The file should be listed in the files app, thumbnails should be created for the appropriate file types, it should be possible to preview the files and download them.
Actual behaviour
The files appear in the files app, but thumbnail generation and attempts to open them and download them fail leaving "Couldn't re-calculate unencrypted size", "OCP\Encryption\Exceptions\GenericEncryptionException: Bad Signature" and "OCP\Encryption\Exceptions\GenericEncryptionException: Missing Signature" errors in the logs.
Occasionally the thumbnails get created and the files become available, but even then it can require two or more attempts before they can be downloaded because the first attempts fails with a browser error (file unavailable, or 0-size file downloaded) or because the https:///remote.php/webdav/?downloadStartSecret= link times out. Even then the file can later become inaccessible again.
Small files seem more likely to work, but I could be mistaken. The default files created by Nextcloud, who aren't encrypted, work regularly, but as soon as I launch occ encryption:encrypt-all, they become unavailable (no thumbnail, preview and download stop working).
On the same server with the same settings but encryption disabled everything works correctly.
Server configuration
Operating system: Ubuntu 18.04.1
Web server: nginx 1.14.0-0ubuntu1.1
Database: mariadb 10.1.34-0ubuntu0.18.04.1
PHP version: 7.2.10-0ubuntu0.18.04.1
Nextcloud version: 14.0.3
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: tar.bz2 file downloaded from the website
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: no (DigitalOcean Spaces as primary object storage)
Are you using encryption: yes
Are you using an external user-backend, if yes which one: no
Client configuration
Browser: Firefox 60 ESR, Safari on iOS 12.01
Operating system: Ubuntu 18.04, iOS 12.0.1 on iPad
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
The text was updated successfully, but these errors were encountered: