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

[OCP\Files\StorageNotAvailableException] with encryption:scan:legacy-format or encryption:decrypt-all #25044

Closed
micah opened this issue Jan 8, 2021 · 6 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: encryption (server-side) needs info

Comments

@micah
Copy link

micah commented Jan 8, 2021

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Ran occ encryption:scan:legacy-format

Expected behaviour

I'm not exactly sure what this is supposed to do, the documentation does not tell me.

Actual behaviour

It scanned files, and then ended with:

In DAV.php line 867:
                                                                                      
  Sabre\HTTP\ClientException: Failed to connect to cloud.someplace.org port 443: No   
  route to host                                                                       
                                                                                      
encryption:scan:legacy-format

It showed a file without a proper header, so I removed it, and scanned again, this time it found no files with improper headers, and instead said this at the end:

In Availability.php line 94:
                                                
  [OCP\Files\StorageNotAvailableException (1)]  
                                                

encryption:scan:legacy-format

Server configuration

Operating system:
Debian Buster

Web server:
nginx

Database:
mysql

PHP version:
7.3

Nextcloud version: (see Nextcloud admin page)
20.0.4

Updated from an older Nextcloud/ownCloud or fresh install:
Updated

Where did you install Nextcloud from:
nextcloud download

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.6.0
  - activity: 2.13.4
  - admin_audit: 1.10.0
  - bruteforcesettings: 2.0.1
  - calendar: 2.1.3
  - cloud_federation_api: 1.3.0
  - comments: 1.10.0
  - contacts: 3.4.3
  - contactsinteraction: 1.1.0
  - dashboard: 7.0.0
  - dav: 1.16.2
  - encryption: 2.8.1
  - federatedfilesharing: 1.10.2
  - federation: 1.10.1
  - files: 1.15.0
  - files_pdfviewer: 2.0.1
  - files_rightclick: 0.17.0
  - files_sharing: 1.12.1
  - files_trashbin: 1.10.1
  - files_versions: 1.13.0
  - files_videoplayer: 1.9.0
  - firstrunwizard: 2.9.0
  - impersonate: 1.7.0
  - logreader: 2.5.0
  - lookup_server_connector: 1.8.0
  - news: 15.1.1
  - nextcloud_announcements: 1.9.0
  - notifications: 2.8.0
  - oauth2: 1.8.0
  - onlyoffice: 6.2.0
  - password_policy: 1.10.1
  - photos: 1.2.1
  - previewgenerator: 3.1.0
  - privacy: 1.4.0
  - provisioning_api: 1.10.0
  - recommendations: 0.8.0
  - serverinfo: 1.10.0
  - settings: 1.2.0
  - sharebymail: 1.10.0
  - support: 1.3.0
  - survey_client: 1.8.0
  - systemtags: 1.10.0
  - tasks: 0.13.6
  - text: 3.1.0
  - theming: 1.11.0
  - twofactor_backupcodes: 1.9.0
  - twofactor_totp: 5.0.0
  - twofactor_u2f: 6.0.0
  - updatenotification: 1.10.0
  - user_status: 1.0.1
  - viewer: 1.4.0
  - weather_status: 1.0.0
  - workflowengine: 2.2.0
Disabled:
  - announcementcenter
  - bookmarks
  - circles
  - deck
  - files_external
  - files_markdown
  - ownpad
  - spreed
  - twofactor_yubikey
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
           '***REMOVED SENSITIVE VALUE***'
        ],
        "enable_previews": true,
        "preview_max_x": 1024,
        "preview_max_y": 768,
        "preview_max_scale_factor": 1,
        "enabledPreviewProviders": [
            "OC\\Preview\\PNG",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\Movie",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown"
        ],
        "filesystem_check_changes": 0,
        "activity_expire_days": 14,
        "knowledgebaseenabled": false,
        "auth.bruteforce.protection.enabled": true,
        "blacklisted_files": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db"
        ],
        "cron_log": true,
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "http:\/\/***REMOVED SENSITIVE VALUE***\/nextcloud",
        "htaccess.RewriteBase": "\/nextcloud",
        "dbtype": "mysql",
        "maintenance": false,
        "mail_smtpdebug": true,
        "version": "20.0.4.0",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 2,
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpsecure": "ssl",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mysql.utf8mb4": true,
        "theme": "",
        "trashbin_retention_obligation": "auto, 7",
        "updater.release.channel": "stable",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [
            "test2fa",
            "admin"
        ],
        "twofactor_enforced_excluded_groups": [],
        "config_is_read_only": "True",
        "encryption.legacy_format_support": true,
        "encryption.key_storage_migrated": false
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
no

Are you using encryption: yes/no
yes

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Nextcloud log (data/nextcloud.log)

Nextcloud log
empty
@micah micah added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jan 8, 2021
@szaimen
Copy link
Contributor

szaimen commented Jun 22, 2021

Duplicate of #24240 (comment)

@szaimen szaimen marked this as a duplicate of #24240 Jun 22, 2021
@szaimen szaimen closed this as completed Jun 22, 2021
@solracsf
Copy link
Member

solracsf commented Aug 8, 2021

@szaimen this does not work for me; after run occ files:scan --all, problem remains.

@solracsf solracsf reopened this Aug 8, 2021
@solracsf solracsf changed the title encryption:scan:legacy-format [OCP\Files\StorageNotAvailableException (1)] [OCP\Files\StorageNotAvailableException] with encryption:scan:legacy-format or encryption:decrypt-all Aug 8, 2021
@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of feature: encryption (server-side) and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 8, 2021
@FelixOliverLange
Copy link

I've encountered the issue as well.
System: Nextcloud 22.2.3 running on PHP 8 with a MySQL 8 DB backend.
The encryption:scan:legacy-format quits with the same exception, though for me a different line is affected:

In Availability.php line 93:
  [OCP\Files\StorageNotAvailableException (1)]

I ran occ files:scan --all and retriggered encryption:scan:legacy-format, with no change to before, though the execution is faster.

I checked for Encryption-related errors that are mentioned in #24240 (comment)
I found multiple incidents of such errors, but they were already existent on NextCloud 20 and did not occur on versions 21 and 22. However, I also updated only today, so that may very well change. The files affected are also still readable in the web UI, so no data loss yet as it seems.

@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 23, 2023
@szaimen szaimen closed this as completed Mar 6, 2023
@Id2ndR
Copy link

Id2ndR commented Jul 2, 2023

I still encounter the issue when running occ encryption:scan:legacy-format with Nextcloud 25.0.8.2

In Availability.php line 93:
                                                
  [OCP\Files\StorageNotAvailableException (1)]  
                                                

The verbose mode does not help to understand which file was read.

@Shieldowskyy
Copy link

I have encountered the same error so I can't disable encryption on my instance as it is impossible to fully decrypt the files. Is there any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: encryption (server-side) needs info
Projects
None yet
Development

No branches or pull requests

6 participants