nextcloud / nextcloud/server

[Bug]: Share within Share inherits permissions if using internal link or Shares/"shared_with_me" from NavBar

Open
#58,329 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 32-feedback bug feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

This is with version 31.0.13, as well as 31.0.14.
(EDIT: Updated to 32.0.6)

'share_folder' => '/Shared_with_me',

Internal links and shared_with_me from Navigation bar for nested Shares inherent permissions from parent folder. Both folders are shared independently, but the path and thus the permissions are different if one is opening the folders via "All Files"/Shared_with_me OR using "Shared_with_me" from the navbar and internal links.

Steps to reproduce
  1. Create two circles A and B
  2. Create parent folder PARENT and sub folder CHILD within PARENT
  3. Share PARENT to A with read-only
  4. Share CHILD to B with read-write
  5. Create and use internal link of CHILD, OR find CHILD in "Shared_with_me" and open it from there (you have read-only access)
  6. (If you go from "All Files"/"Shared_with_me" to CHILD, then you have read-write access)
Expected behavior

It should directly link to the respective share without the parent folder. It should behave like point 6 from "Steps to reproduce".
This or that way, it should behave the same in both methods (5 and 6).

Nextcloud Server version

32

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.3

Web server

Apache (supported)

Database engine version

PostgreSQL

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

None

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
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nxcl.REDACTED",
            "nxcl.REDACTED"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "31.0.14.1",
        "overwrite.cli.url": "https:\/\/nxcl.REDACTED",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "check_for_working_htaccess": "true",
        "remember_login_cookie_lifetime": "604800",
        "session_lifetime": "86400",
        "session_keepalive": true,
        "auto_logout": false,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "default_phone_region": "DE",
        "skeletondirectory": " ",
        "profile.enabled": false,
        "quota_include_external_storage": false,
        "default_language": "de",
        "default_locale": "de_DE",
        "knowledgebaseenabled": false,
        "upgrade.disable-web": "true",
        "updater.release.channel": "stable",
        "maintenance_window_start": "1",
        "loglevel": 1,
        "log_type": "file",
        "logfile": "\/tmpnxcl\/nxcl_log_path\/nextcloud.log",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": "14",
        "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\\MP3",
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\MP4",
            "OC\\Preview\\PDF"
        ],
        "auth.bruteforce.protection.enabled": "true",
        "overwriteprotocol": "https",
        "forbidden_filenames": [
            ".htaccess",
            "Thumbs.db",
            "thumbs.db"
        ],
        "check_data_directory_permissions": "true",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "6379"
        },
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "lost_password_link": "REDACTED",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "share_folder": "\/Shared_with_me",
        "mail_smtpport": "587",
        "maintenance": false,
        "auth.webauthn.enabled": false,
        "mail_smtpsecure": "tls",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "cache_path": "\/tmpnxcl\/nxcl_cache_path",
        "files.chunked_upload.max_size": 314572800
    }
}
List of activated Apps
Enabled:
  - activity: 4.0.0
  - app_api: 5.0.2
  - assistant: 2.12.0
  - bruteforcesettings: 4.0.0
  - calendar: 5.5.14
  - circles: 31.0.0
  - cloud_federation_api: 1.14.0
  - contacts: 7.3.13
  - contactsinteraction: 1.12.1
  - dav: 1.33.0
  - deck: 1.15.6
  - federatedfilesharing: 1.21.0
  - federation: 1.21.0
  - files: 2.3.1
  - files_downloadlimit: 4.0.0
  - files_pdfviewer: 4.0.0
  - files_reminders: 1.4.0
  - files_sharing: 1.23.2
  - files_trashbin: 1.21.0
  - files_versions: 1.24.0
  - forms: 5.2.4
  - integration_openai: 3.10.0
  - logreader: 4.0.0
  - lookup_server_connector: 1.19.0
  - notes: 4.13.0
  - notifications: 4.0.0
  - notify_push: 1.3.0
  - oauth2: 1.19.1
  - photos: 4.0.0
  - privacy: 3.0.0
  - profile: 1.0.0
  - provisioning_api: 1.21.0
  - recommendations: 4.0.0
  - related_resources: 2.0.0
  - richdocuments: 8.7.7
  - serverinfo: 3.0.0
  - settings: 1.14.0
  - sharebymail: 1.21.0
  - spreed: 21.1.9
  - systemtags: 1.21.1
  - text: 5.0.2
  - theming: 2.6.1
  - twofactor_backupcodes: 1.20.0
  - twofactor_totp: 13.0.0-dev.0
  - twofactor_webauthn: 2.4.1
  - user_ldap: 1.22.0
  - viewer: 4.0.0
  - webhook_listeners: 1.2.0
  - workflowengine: 2.13.0
Disabled:
  - admin_audit: 1.21.0
  - apporder: 0.15.0 (installed 0.15.0)
  - checksum: 2.0.3 (installed 2.0.3)
  - comments: 1.21.0 (installed 1.21.0)
  - dashboard: 7.11.0 (installed 7.4.0)
  - encryption: 2.19.0
  - external: 6.0.2 (installed 6.0.2)
  - extract: 1.3.6 (installed 1.3.6)
  - files_external: 1.23.1 (installed 1.21.0)
  - files_retention: 2.0.1 (installed 2.0.1)
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - firstrunwizard: 4.0.0 (installed 2.13.0)
  - nextcloud_announcements: 3.0.0 (installed 1.13.0)
  - password_policy: 3.0.0 (installed 1.14.0)
  - quicknotes: 0.8.30 (installed 0.8.30)
  - support: 3.0.0 (installed 1.10.0)
  - survey_client: 3.0.0 (installed 1.12.0)
  - suspicious_login: 9.0.1
  - tasks: 0.17.1 (installed 0.17.1)
  - terms_of_service: 4.6.1 (installed 4.6.1)
  - twofactor_nextcloud_notification: 5.0.0
  - updatenotification: 1.21.0 (installed 1.14.0)
  - user_status: 1.11.0 (installed 1.4.0)
  - weather_status: 1.11.0 (installed 1.4.0)
Nextcloud Signing status
No errors have been found.
Nextcloud Logs

Additional info

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the nested-share scenario with parent read-only access and child read-write access, comparing the internal link, Shared_with_me navigation, and All Files paths. Trace the server-side handling of these entry points and verify that each path resolves the child share independently; done means both navigation methods provide the same permissions.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authorization, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.