nextcloud / nextcloud/server

[Bug]: Can't move or rename remote shared folder

Open
#53,400 7 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 30-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

Can't move or rename a folder shared by another nextcloud instance.
Error NotFoundException Node for share not found, fileid: 176232

Seem to be the same issue of #46467
occ sharing:delete-orphan-shares fix the issue.

Steps to reproduce
  1. Share a folder from an instance to another
  2. Try to rename or move the folder in the destination instance
  3. See the error
Expected behavior

No error.

Nextcloud Server version

30

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

MariaDB

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

Updated from a MINOR version (ex. 32.0.1 to 32.0.2)

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": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED_FOR"
        ],
        "trusted_domains": [
            "cloud.lebib.org",
            "nuage.lebib.org",
            "claude.lebib.org",
            "bib-cloud.lebib.lan",
            "bib-cloud",
            "10.13.208.6"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.11.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "default_language": "fr",
        "installed": true,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "enable_previews": true,
        "preview_max_x": 2048,
        "preview_max_scale_factor": 1,
        "log_type": "file",
        "syslog_tag": "NextCloud",
        "loglevel": 3,
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "log_query": false,
        "updater.release.channel": "stable",
        "allow_user_to_change_display_name": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "mysql.utf8mb4": true,
        "mail_sendmailmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "cache_chunk_gc_ttl": 86400,
        "default_phone_region": "FR",
        "maintenance": false,
        "overwrite.cli.protocol": "https",
        "overwrite.cli.url": "https:\/\/cloud.lebib.org",
        "webhooks_calendar_object_created_url": "https:\/\/framagit.org\/api\/v4\/projects\/84144\/ref\/main\/trigger\/pipeline?token=glptt-36bc1bc933dc7e9dedf9397010a39993067899bf",
        "mail_smtpdebug": false,
        "debug": false,
        "mail_smtpsecure": "ssl",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": true,
                "verify_peer": false,
                "verify_peer_name": false
            }
        },
        "profiler": false,
        "app_install_overwrite": [
            "files_rightclick",
            "issuetemplate",
            "apporder",
            "metadata",
            "calendar_news",
            "side_menu",
            "files_trackdownloads"
        ],
        "maintenance_window_start": 2
    }
}
List of activated Apps
- activity: 3.0.0
  - announcementcenter: 7.1.3
  - app_api: 4.0.6
  - bruteforcesettings: 3.0.0
  - calendar: 5.3.0
  - calendar_resource_management: 0.9.0
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - collectives: 2.17.1
  - comments: 1.20.1
  - contacts: 7.1.1
  - contactsinteraction: 1.11.0
  - cospend: 3.0.11
  - dashboard: 7.10.0
  - data_request: 2.0.1
  - dav: 1.31.1
  - deck: 1.14.5
  - drawio: 3.0.9
  - drop_account: 2.7.1
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_external: 1.22.0
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - fileslibreofficeedit: 2.0.1
  - firstrunwizard: 3.0.0
  - forms: 5.1.0
  - groupfolders: 18.1.2
  - impersonate: 1.17.1
  - integration_dropbox: 3.1.0
  - integration_gitlab: 3.2.0
  - integration_google: 3.2.0
  - integration_openstreetmap: 2.1.0
  - intros: 1.1.2
  - keeweb: 0.6.21
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - maps: 1.5.0
  - nextcloud_announcements: 2.0.0
  - notifications: 3.0.0
  - notify_push: 1.1.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - polls: 7.4.3
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - quota_warning: 1.21.0
  - recommendations: 3.0.0
  - registration: 2.7.0
  - related_resources: 1.5.0
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - side_menu: 4.1.1
  - spreed: 20.1.7
  - survey_client: 2.0.0
  - suspicious_login: 8.0.0
  - systemtags: 1.20.0
  - tables: 0.9.3
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.6.0
  - timemanager: 0.3.18
  - twofactor_backupcodes: 1.19.0
  - updatenotification: 1.20.0
  - uppush: 2.3.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflow_ocr: 1.30.1
  - workflowengine: 2.12.0
Nextcloud Signing status

Nextcloud Logs
[webdav] Erreur: Node for share not found, fileid: 176232
	MOVE /remote.php/dav/files/wargreen/Fete%20de%20la%20Musique
	de 10.12.200.200 par wargreen à 7 juin 2025, 18:23:33

{"reqId":"wYpYln14Ul5dzwDBygNG","level":3,"time":"2025-06-07T16:23:33+00:00","remoteAddr":"10.12.200.200","user":"wargreen","app":"webdav","method":"MOVE","url":"/remote.php/dav/files/wargreen/Fete%20de%20la%20Musique","message":"Node for share not found, fileid: 176232","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:138.0) Gecko/20100101 Firefox/138.0","version":"30.0.11.1","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"Node for share not found, fileid: 176232","Code":0,"Trace":[{"file":"/srv/nextcloud/lib/private/Files/View.php","line":1877,"function":"getNode","class":"OC\\Share20\\Share","type":"->"},{"file":"/srv/nextcloud/lib/private/Files/View.php","line":783,"function":"targetIsNotShared","class":"OC\\Files\\View","type":"->"},{"file":"/srv/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":416,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"moveInto","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":612,"function":"move","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/srv/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/srv/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/apps/dav/lib/Connector/Sabre/Server.php","line":49,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/apps/dav/lib/Server.php","line":378,"function":"start","class":"OCA\\DAV\\Connector\\Sabre\\Server","type":"->"},{"file":"/srv/nextcloud/apps/dav/appinfo/v2/remote.php","line":19,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/srv/nextcloud/remote.php","line":146,"args":["/srv/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/srv/nextcloud/lib/private/Share20/Share.php","Line":166,"message":"Node for share not found, fileid: 176232","exception":[],"CustomMessage":"Node for share not found, fileid: 176232"},"id":"684472dea36a5"}
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 with lib/private/Files/View.php around lines 783 and 1877, then follow the share lookup in lib/private/Share20/Share.php around line 166. Reproduce the WebDAV MOVE for a folder shared from another instance and trace the failing federated-share path. Done means the remote shared folder can be moved or renamed without the NotFoundException, with coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
mariadb, php
Domain
backend, distributed-systems
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.