nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.42k stars 4.07k forks source link

[Bug]: occ files:move source target command throw OCP\Files\NotFoundException #44018

Open alexistr opened 8 months ago

alexistr commented 8 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

When using occ files:move console command, file is correctly moved but OCP\Files\NotFoundException is throw

Steps to reproduce

1.sudo -u www-data php occ files:move </user/files/source> </user/files/target>

Expected behavior

</user/files/source> should be moved to </user/files/target> and OCP\Files\NotFoundException should not be thrown

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

MariaDB

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?

Configuration report

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "28.0.3.2",
        "installedat": "1330097471.4123",
        "lastupdatedat": "1334313272.6384",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "apps_paths": [
            {
                "path": "\/home\/alexis\/public_html\/owncloud\/apps",
                "url": "\/apps",
                "writable": true
            }
        ],
        "theme": "",
        "installed": true,
        "forcessl": true,
        "trusted_domains": [
            "ns39451.ovh.net",
            "149.202.170.56",
            "notreserveur.ddns.net"
        ],
        "secret": "***REMOVED SENSITIVE VALUE***",
        "loglevel": 2,
        "singleuser": false,
        "trashbin_retention_obligation": "auto",
        "updater.release.channel": "stable",
        "appstore.experimental.enabled": true,
        "overwrite.cli.url": "https:\/\/notreserveur.ddns.net\/owncloud",
        "mail_smtpmode": "sendmail",
        "mail_sendmailmode": "smtp",
        "mysql.utf8mb4": true,
        "default_phone_region": "FR",
        "app_install_overwrite": [
            "calendar",
            "audioplayer",
            "contacts",
            "audioplayer_editor",
            "unsplash"
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "maintenance_window_start": 1,
        "updater.secret": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - activity: 2.20.0
  - admin_audit: 1.18.0
  - circles: 28.0.0-dev
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contacts: 5.5.2
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_external: 1.20.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.0
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - unsplash: 2.2.1
  - updatenotification: 1.18.0
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - audioplayer: 3.4.1 (installed 3.4.1)
  - audioplayer_editor: 0.2.0 (installed 0.2.0)
  - bruteforcesettings: 2.8.0 (installed 1.4.0)
  - encryption: 2.16.0
  - files_rightclick: 0.15.1 (installed 1.6.0)
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2
  - user_ldap: 1.19.0 (installed 0.2)

Nextcloud Signing status

No errors have been found

Nextcloud Logs

{"reqId":"kszF93Q1zFrsfsseXCD7","level":3,"time":"2024-03-06T08:11:50+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Exception thrown: OCP\\Files\\NotFoundException","userAgent":"--","version":"28.0.3.2","exception":{"Exception":"OCP\\Files\\NotFoundException","Message":"","Code":0,"Trace":[{"file":"/home/alexis/public_html/owncloud/lib/private/Files/Node/Node.php","line":386,"function":"getFileInfo","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/home/alexis/public_html/owncloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":362,"function":"getOwner","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/home/alexis/public_html/owncloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":301,"function":"getPathForNode","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/home/alexis/public_html/owncloud/apps/files_versions/lib/Listener/FileEventsListener.php","line":118,"function":"rename_hook","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/home/alexis/public_html/owncloud/lib/private/EventDispatcher/ServiceEventListener.php","line":86,"function":"handle","class":"OCA\\Files_Versions\\Listener\\FileEventsListener","type":"->"},{"file":"/home/alexis/public_html/owncloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":230,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/home/alexis/public_html/owncloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":59,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/alexis/public_html/owncloud/lib/private/EventDispatcher/EventDispatcher.php","line":94,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/alexis/public_html/owncloud/lib/private/EventDispatcher/EventDispatcher.php","line":106,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/alexis/public_html/owncloud/lib/private/Files/Node/HookConnector.php","line":185,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/home/alexis/public_html/owncloud/lib/private/legacy/OC_Hook.php","line":105,"function":"postRename","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/home/alexis/public_html/owncloud/lib/private/Files/View.php","line":837,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/home/alexis/public_html/owncloud/lib/private/Files/Node/Node.php","line":468,"function":"rename","class":"OC\\Files\\View","type":"->"},{"file":"/home/alexis/public_html/owncloud/apps/files/lib/Command/Move.php","line":117,"function":"move","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/home/alexis/public_html/owncloud/3rdparty/symfony/console/Command/Command.php","line":298,"function":"execute","class":"OCA\\Files\\Command\\Move","type":"->"},{"file":"/home/alexis/public_html/owncloud/3rdparty/symfony/console/Application.php","line":1040,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/home/alexis/public_html/owncloud/3rdparty/symfony/console/Application.php","line":301,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/home/alexis/public_html/owncloud/3rdparty/symfony/console/Application.php","line":171,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/home/alexis/public_html/owncloud/lib/private/Console/Application.php","line":213,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/home/alexis/public_html/owncloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/home/alexis/public_html/owncloud/occ","line":11,"args":["/home/alexis/public_html/owncloud/console.php"],"function":"require_once"}],"File":"/home/alexis/public_html/owncloud/lib/private/Files/Node/Node.php","Line":113,"CustomMessage":"Exception thrown: OCP\\Files\\NotFoundException"},"id":"65e830bee38de"}

Additional info

No response

solracsf commented 8 months ago

Problem seems with versions, not the file itself.

alexistr commented 2 months ago

can anyone confirm this bug?