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

FATAL: Encryption is enabled. Aborted. #99

Closed
TonyNoIT opened this issue Oct 23, 2022 · 7 comments
Closed

FATAL: Encryption is enabled. Aborted. #99

TonyNoIT opened this issue Oct 23, 2022 · 7 comments
Labels
feature New feature or request

Comments

@TonyNoIT
Copy link

After I tried to - sudo -u www-data php ./occ memories:index
Give error
FATAL: Encryption is enabled. Aborted.

Is this module works with standard encryption on Nextcloud?

@pulsejet
Copy link
Owner

Is this module works with standard encryption on Nextcloud?

No. Because memories does server-side processing, it cannot support end-to-end encrypted files without leaking information.

@pulsejet pulsejet closed this as not planned Won't fix, can't repro, duplicate, stale Oct 23, 2022
@pulsejet pulsejet added the wontfix This will not be worked on label Oct 23, 2022
@eltos
Copy link
Contributor

eltos commented Nov 5, 2022

@pulsejet could you elaborate a bit more on this?
Nextcloud features two kinds of encryption:

  • Server-side encryption: files on the drive are encrypted, but the server has the keys when a user is logged in
  • End-to-end encryption: No way for the server to decrypt files

Is it only the latter or both that are not supported?
Is it just the occ command for initial indexing of existing files, or the memories app in general not supporting it?
Is there an alternative way for initial indexing (e.g. deleting and re-uploading all files)?

@eltos
Copy link
Contributor

eltos commented Nov 5, 2022

Just tested it with server-side encryption: the occ command fails, but all images uploaded after installation of the Memories app do show up in the timeline. So maybe all it needs to fully support server-side encryption is a method to do the indexing on a per-user basis, e.g. from the welcome screen when a user first opens the app?

@pulsejet
Copy link
Owner

pulsejet commented Nov 5, 2022

I assumed the issue is about e2e encryption (maybe incorrectly). Not sure how the internals of server-side encryption work, but I'm willing to accept a pull request if we can support this.

@eltos
Copy link
Contributor

eltos commented Nov 5, 2022

Might be worth taking a look how the metadata app does it. Maybe there is even a way to interface with it directly.

@TonyNoIT
Copy link
Author

TonyNoIT commented Nov 6, 2022

That what I did for my files…
If files uploaded after - everything work 🤷‍♂️

@pulsejet pulsejet reopened this Nov 7, 2022
@pulsejet pulsejet added feature New feature or request and removed wontfix This will not be worked on labels Nov 7, 2022
@eltos
Copy link
Contributor

eltos commented Nov 7, 2022

Well, actually even the occ memories:index command works perfectly fine with server-side encryption. Just comment out that return statement in lib/Command/Index.php

if ($this->encryptionManager->isEnabled()) {
    error_log('FATAL: Encryption is enabled. Aborted.');
    return 1;
}

I observed that Nextcloud automatically provides a decrypted copy in /tmp, and when getExifFromFile is called the $path = $file->getStorage()->getLocalFile($file->getInternalPath()); is that temporary (unencrypted) file, so exiftool has no problem reading it.

Likewise, for the safety-check in updateExifDate: I see that you "Don't want to mess these up, definitely", but it actually just works if you are brave enough 😉

I haven't found official documentation on this unencrypted tmp-file mechanism, this is all inductive reasoning. You probably want to verify that independently. Plus, for E2E encryption, these safety checks might be wise to keep.

eltos added a commit to eltos/memories that referenced this issue Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants