Skip to content

[Bug]: Configuring sharing (and other mount point options) for External Storage in the UI doesn't work properly #58950

@jameswyper

Description

@jameswyper

⚠️ This issue respects the following points: ⚠️

Bug description

This is on Nextcloud 33 which I upgraded from 31 to 32 to 33 earlier today. I don't know if this behavior is present in earlier versions.

The "Mount Options" UI in External Storage configuration is not working properly. I set up a mount but I was unable to share it, despite the UI saying sharing was enabled. I then disabled sharing in the UI and was able to share. occ files_external:list confirmed that the UI was showing the opposite of the true configuration. Screenshots at https://help.nextcloud.com/t/unable-to-share-external-storage/241755/3

Additionally, I cannot now change the sharing option in the UI. It appears to accept me flicking the "Enable Sharing" switch and asks for the admin password, but when I go back to the options nothing has changed.

FWIW the "Read only" setting in the UI and occ backend has the same problems (UI won't always update, and it's out of sync with the backend)

Screenshot of UI
Image

Output of files_external:list - note that enable_sharing is set to 1 and readonly is unset

root@47ceae2d9221:/var/www/html# php occ files_external:list
+----------+------------------+---------+---------------------+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------------+-------------------+
| Mount ID | Mount Point      | Storage | Authentication Type | Configuration                          | Options                                                                                                                  | Applicable Users | Applicable Groups |
+----------+------------------+---------+---------------------+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------------+-------------------+
| 1        | /Video           | Local   | None                | datadir: "\/video"                     | readonly: true                                                                                                           | All              |                   |
| 2        | /Photos-Readonly | Local   | None                | datadir: "\/photoro"                   | readonly: true                                                                                                           | james            | readonly          |
| 3        | /Photos-Editable | Local   | None                | datadir: "\/photo"                     |                                                                                                                          | james            | admin             |
| 4        | /Software        | Local   | None                | datadir: "\/software", isExternal: "1" | encrypt: "1", previews: "", enable_sharing: "1", filesystem_check_changes: "0", encoding_compatibility: "", readonly: "" | All              |                   |
+----------+------------------+---------+---------------------+----------------------------------------+--------------------------------------------------------------------------------------------------------------------------+------------------+-------------------+

Browser: Chrome 145.0.7632.162 but it's the same on Firefox 148.0

Steps to reproduce

  1. Create a new, local external storage mount
  2. Confirm that on the UI sharing is enabled by default
  3. Attempt to share a folder within the mount - fails
  4. Try to disable sharing via the UI. Check that the update actually takes place.
  5. Confirm with occ files_external:list that sharing is enabled
  6. Attempt to share a folder with the mount - success

Expected behavior

The mount options should update successfully and the UI should agree with the settings in occ files_external:list

Nextcloud Server version

33

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.4

Web server

Apache (supported)

Database engine version

MariaDB

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

Upgraded to a MAJOR version (ex. 31 to 32)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

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

Configuration report

root@47ceae2d9221:/var/www/html# php occ config:list system
{
    "system": {
        "htaccess.RewriteBase": "\/",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpsecure": "tls",
        "mail_smtpauth": true,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "upgrade.disable-web": true,
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "wyper.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "33.0.0.16",
        "overwrite.cli.url": "https:\/\/wyper.org\/files",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwritewebroot": "\/files",
        "overwriteprotocol": "https",
        "skeletondirectory": "",
        "templatedirectory": "",
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-aarch64-glibc",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-aarch64",
        "maintenance": false,
        "loglevel": 2
    }
}

List of activated Apps

root@47ceae2d9221:/var/www/html# php occ app:list
Enabled:
  - activity: 6.0.0-dev.0
  - app_api: 33.0.0
  - bruteforcesettings: 6.0.0-dev.0
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contactsinteraction: 1.14.1
  - dashboard: 7.13.0
  - dav: 1.36.0
  - federatedfilesharing: 1.23.0
  - federation: 1.23.0
  - files: 2.5.0
  - files_downloadlimit: 5.1.0-dev.0
  - files_external: 1.25.1
  - files_pdfviewer: 6.0.0-dev.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - firstrunwizard: 6.0.0-dev.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - nextcloud_announcements: 5.0.0
  - notifications: 6.0.0
  - oauth2: 1.21.0
  - password_policy: 5.0.0-dev.0
  - photos: 6.0.0-dev.0
  - previewgenerator: 5.13.0
  - privacy: 5.0.0-dev.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recognize: 11.0.1
  - recommendations: 6.0.0-dev.0
  - related_resources: 4.0.0-dev.0
  - serverinfo: 5.0.0-dev.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - support: 5.0.0
  - survey_client: 5.0.0-dev.0
  - systemtags: 1.23.0
  - text: 7.0.0-dev.3
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0-dev.0
  - updatenotification: 1.23.0
  - user_status: 1.13.0
  - viewer: 6.0.0-dev.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - workflowengine: 2.15.0
Disabled:
  - admin_audit: 1.23.0
  - encryption: 2.21.0
  - facerecognition: 0.9.70 (installed 0.9.70)
  - memories: 7.8.2 (installed 7.8.2)
  - suspicious_login: 11.0.0-dev.0
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

I've attached the logs as with debug enabled (which I thought would be helpful - there are no error or warning level messages normally when I try this) it broke the 64k character limit for this box

Additional info

I switched on debug logging for the time required to reproduce the issue (try and enable sharing in the UI, save, check and see that it's still disabled)

nextcloud debug.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions