Permissions incorrect when file uploaded via public share to group folder

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.4
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04.4 LTS x86_64
  • Web server and version (e.g, Apache 2.4.25):
    • Apache 2.4.68
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • N/A
  • PHP version (e.g, 8.3):
    • 8.3
  • Is this the first time you’ve seen this error? (Yes / No):
    • No, this has been going on for a week or two
  • When did this problem seem to first start?
    • About two weeks ago
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • Bare Metal/Archive
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

When a file is uploaded to a folder that is a subfolder of a group folder (team folder) via public share (file request), the uploaded file has restricted permissions, even for the file owner or the Admin account. This does not happen if the shared folder is a personal (user account) folder instead of a group folder. It also does not happen if the file is uploaded via the internal (logged in) web interface or via the desktop app. It apparently only happens if the folder or subfolder is a group folder AND the file is uploaded via public share.

Steps to replicate it (hint: details matter!):

  1. Upload a file via public link to subfolder of team folder

  2. Check permissions

Table of file permissions after upload:

Log entries

Nextcloud

Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log located in your data directory). Feel free to use a pastebin/gist service if necessary.

https://gist.github.com/RayCulp/11f1835ee5b41c9cef6e0ea9912b5653

Web Browser

If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.

N/A

Web server / Reverse Proxy

The output of your Apache/nginx/system log in /var/log/____:

N/A

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "33.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/nextcloud.culp.de",
        "default_phone_region": "DE",
        "maintenance": false,
        "theme": "",
        "loglevel": 0,
        "app_install_overwrite": [
            "impersonate",
            "quicknotes"
        ],
        "trashbin_retention_obligation": "1, 3",
        "maintenance_window_start": 1
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 6.0.0
  - admin_audit: 1.23.0
  - announcementcenter: 7.4.1
  - app_api: 33.0.0
  - bookmarks: 16.2.1
  - bruteforcesettings: 6.0.0
  - calendar: 6.4.2
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contacts: 8.7.0
  - cookbook: 0.11.7
  - dashboard: 7.13.0
  - dav: 1.36.0
  - deck: 1.17.3
  - external: 8.0.1
  - federatedfilesharing: 1.23.0
  - files: 2.5.0
  - files_automatedtagging: 4.0.0
  - files_downloadlimit: 5.1.0
  - files_external: 1.25.1
  - files_pdfviewer: 6.0.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
  - flow_notifications: 4.0.0
  - gpxpod: 8.2.1
  - groupfolders: 21.0.8
  - impersonate: 4.0.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - mail: 5.9.2
  - nextcloud_announcements: 5.0.0
  - notes: 6.0.0
  - notifications: 6.0.0
  - oauth2: 1.21.0
  - password_policy: 5.0.0
  - photos: 6.0.0
  - privacy: 5.0.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - quicknotes: 0.8.50
  - recommendations: 6.0.0
  - related_resources: 4.0.0
  - richdocuments: 10.2.0
  - richdocumentscode: 26.4.104
  - serverinfo: 5.0.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - spreed: 23.0.6
  - support: 5.0.0
  - survey_client: 5.0.0
  - systemtags: 1.23.0
  - tasks: 0.17.1
  - text: 7.0.1
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0
  - updatenotification: 1.23.0
  - user_retention: 1.17.0
  - user_status: 1.13.0
  - viewer: 6.0.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - workflow_ocr: 1.33.1
  - workflow_script: 4.0.0
  - workflowengine: 2.15.0
Disabled:
  - contactsinteraction: 1.14.1 (installed 1.13.1)
  - encryption: 2.21.0
  - federation: 1.23.0 (installed 1.14.0)
  - files_accesscontrol: 4.0.1 (installed 4.0.1)
  - suspicious_login: 11.0.0
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

I’m thinking maybe this isn’t the right venue to report this type of problem. I’m not actually asking for help, just sharing some strange behavior I noticed, and ofc wondering if anyone else has experienced the same. Should I open an issue on Github, maybe for the Team Folders app? :folded_hands:

I have opened an issue on Github for the Team Folders app. I hope that is a better place to report the problem. :folded_hands: You can find the issue here: Permissions incorrect when file uploaded via public share to a group folder · Issue #4816 · nextcloud/groupfolders · GitHub

Turns out this issue is already being fixed in an upcoming patch. So I’m closing this request / marking this as solved.