server icon indicating copy to clipboard operation
server copied to clipboard

[Bug]: Cannot share files or folders with Objectstorage as primary storage

Open Fuhunter opened this issue 4 years ago • 6 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

I migrated my data folder to aws s3 objectstorage and using it as main storage for all of my files. Since then I am not able to share files and folders. It doesn’t matter if its an existing file or a new uploaded one. I either get the message “Error Creating Share” or “Link Copied” without actually copying the link to my clipboard. Regardless of the response I can see the the created share in my database oc_share. When I try using the link domain.com/s/{token} it always says it couldn’t finde the share and it may have expired.

I also tried sharing a folder or file with another user und my server directly which results in the same issue.

Steps to reproduce

  1. Use S3 as primary storage
  2. create share link for files or folders

Expected behavior

Share link successfully created and accessible

Installation method

Official All-in-One appliance

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Apache (supported)

Database engine version

MySQL

Is this bug present after an update or on a fresh install?

Updated to a major version (ex. 22.2.3 to 23.0.1)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "objectstore": {
            "class": "OC\\Files\\ObjectStore\\S3",
            "arguments": {
                "bucket": "***REMOVED SENSITIVE VALUE***",
                "autocreate": false,
                "key": "***REMOVED SENSITIVE VALUE***",
                "secret": "***REMOVED SENSITIVE VALUE***",
                "use_ssl": true,
                "region": "eu-central-1",
                "uploadPartSize": 104857600
            }
        },
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "25.0.1.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "Europe\/Berlin",
        "log_query": false,
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "theme": "",
        "maintenance": false,
        "loglevel": 3,
        "debug": false,
        "trashbin_retention_obligation": "auto",
        "log_rotate_size": 104857600,
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MSOffice2007"
        ],
        "forcessl": true,
        "htaccess.RewriteBase": "\/",
        "updatechecker": false,
        "singleuser": false,
        "mysql.utf8mb4": true,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_sendmailmode": "smtp",
        "mail_smtpport": "25",
        "updater.release.channel": "stable",
        "default_phone_region": "DE"
    }
}

List of activated Apps

Enabled:
  - activity: 2.17.0
  - admin_audit: 1.15.0
  - cfg_share_links: 3.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - dashboard: 7.5.0
  - dav: 1.24.0
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_downloadactivity: 1.15.0
  - files_external: 1.17.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - groupfolders: 13.1.0
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - metadata: 0.17.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - quota_warning: 1.15.0
  - ransomware_protection: 1.14.0
  - recommendations: 1.4.0
  - related_resources: 1.0.3
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - support: 1.8.0
  - survey_client: 1.13.0
  - systemtags: 1.15.0
  - theming: 2.0.1
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflowengine: 2.7.0
Disabled:
  - announcementcenter: 6.4.0
  - breezedark: 24.0.2
  - bruteforcesettings: 1.3.0
  - calendar: 4.1.0
  - camerarawpreviews: 0.8.0
  - circles: 24.0.1
  - contactsinteraction: 1.5.0
  - duplicatefinder: 0.0.15
  - encryption: 2.3.0
  - end_to_end_encryption: 1.10.0
  - epubreader: 1.4.7
  - files_accesscontrol: 1.15.0
  - files_automatedtagging: 1.15.0
  - imageconverter: 1.3.4
  - impersonate: 1.11.0
  - integration_github: 1.0.13
  - integration_gitlab: 1.0.10
  - socialsharing_email: 2.5.0
  - spreed: 15.0.1
  - suspicious_login
  - text: 3.5.1
  - twofactor_totp: 0.5.2
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No entries generated

Additional info

Error Log from Safari Console

[Error] Failed to load resource: the server responded with a status of 404 (Not Found) (538087, line 0)
https://domain.com/remote.php/dav/systemtags-relations/files/538087
https://domain.com/remote.php/dav/comments/files/538087

https://domain.com/ocs/v2.php/apps/files_sharing/api/v1/shares in ShareRequests.js:62

Fileid is existing in database and in S3 Storage. I am also able to download the files, delete or move them. Cross posted here: https://help.nextcloud.com/t/cannot-share-files-or-folders-with-objectstorage/150931

Fuhunter avatar Dec 01 '22 10:12 Fuhunter

Can confirm.

thelfensdrfer avatar Dec 15 '22 10:12 thelfensdrfer

Can also confirm.

EvanSchleret avatar Jan 05 '23 22:01 EvanSchleret

@EvanSchleret This worked for me: https://github.com/nextcloud/server/issues/25781#issuecomment-1383091969

thelfensdrfer avatar Jan 15 '23 20:01 thelfensdrfer

@EvanSchleret This worked for me: #25781 (comment)

You're the best. Many thanks 🎉🎉🎉

EvanSchleret avatar Jan 15 '23 23:01 EvanSchleret

I migrated my data folder to aws s3 objectstorage and using it as main storage for all of my files. Since then I am not able to share files and folders.

How, precisely, did you migrate? That might be playing a role in the behavior you're seeing.

joshtrichards avatar Sep 08 '23 14:09 joshtrichards

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

nextcloud-command avatar Oct 18 '23 00:10 nextcloud-command