Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moving files in public folder is not possible #33479

Closed
individual-it opened this issue Nov 12, 2018 · 4 comments
Closed

moving files in public folder is not possible #33479

individual-it opened this issue Nov 12, 2018 · 4 comments
Labels

Comments

@individual-it
Copy link
Member

individual-it commented Nov 12, 2018

Steps to reproduce

  1. create a folder called "parent" with a file "test.txt" and a subfolder called "subfolder"
  2. share "parent" as public link and allow "Download / View / Upload"
  3. access the new public link
  4. try to move "test.txt" into "subfolder"

Expected behaviour

files is moved, no error message

Actual behaviour

file does not get moved
error message shown: Could not move "test.txt": Call to a member function getId() on null

Server configuration

Operating system:
Ubuntu 18.04
Web server:
Apache2
Database:
Sqlite
PHP version:
7.1
ownCloud version: (see ownCloud admin page)
11.0.0 prealpha (git)
Updated from an older ownCloud or fresh install:
fresh
Where did you install ownCloud from:
git

The content of config/config.php:

{
    "system": {
        "instanceid": "oc4h10g96s3a",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "license-key": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "172.17.0.1"
        ],
        "datadirectory": "\/home\/artur\/www\/owncloud-core\/data",
        "overwrite.cli.url": "http:\/\/localhost\/owncloud-core",
        "dbtype": "sqlite3",
        "version": "11.0.0.0",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "htaccess.RewriteBase": "\/owncloud-core\/",
        "sharing.federation.allowHttpFallback": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "1025",
        "files_external_allow_create_new_local": "true",
        "skeletondirectory": "\/home\/artur\/www\/owncloud-core\/tests\/acceptance\/..\/..\/apps\/testing\/data\/apiSkeleton",
        "trusted_proxies": {
            "1": "127.0.0.1",
            "2": "192.168.0.104",
            "3": "172.17.0.1"
        },
        "csrf.disabled": true,
        "enable_previews": false,
        "singleuser": false,
        "installed": true
    }
}

List of activated apps:

Enabled:
  - comments: 0.3.0
  - dav: 0.4.0
  - diagnostics: 0.1.3
  - enterprise_key: 0.1.4
  - federatedfilesharing: 0.3.1
  - federation: 0.1.0
  - files: 1.5.2
  - files_classifier: 1.0.0
  - files_external: 0.7.1
  - files_sharing: 0.11.0
  - files_texteditor: 2.2.1
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - firewall: 2.6.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - systemtags_management: 0.2.0
  - testing: 0.1.0
  - updatenotification: 0.2.1
Disabled:
  - brute_force_protection
  - files_antivirus
  - files_primary_s3
  - guests
  - multidirtest
  - notifications
  - oauth2
  - password_policy
  - search_elastic
  - twofactor_totp
  - user_ldap
  - user_management
  - windows_network_drive
  - workflow

Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
FF
Operating system:
Ubuntu 18.04

Logs

ownCloud log (data/owncloud.log)

{"reqId":"c0I02BnNWXncZssN9NZi","level":4,"time":"2018-11-12T07:48:54+00:00","remoteAddr":"127.0.0.1","user":"--","app":"webdav","method":"MOVE","url":"\/owncloud-core\/public.php\/webdav\/test.txt","message":"Exception: Call to a member function getId() on null: {\"Exception\":\"Error\",\"Message\":\"Call to a member function getId() on null\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/files_classifier\\\/lib\\\/Handler.php(363): OCA\\\\FilesClassifier\\\\Handler->getAllNodeIds(Object(OC\\\\Files\\\\Node\\\\Folder), true)\\n#1 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/symfony\\\/event-dispatcher\\\/EventDispatcher.php(212): OCA\\\\FilesClassifier\\\\Handler->moveAndCopyListener(Object(Symfony\\\\Component\\\\EventDispatcher\\\\GenericEvent), 'file.beforerena...', Object(Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher))\\n#2 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/symfony\\\/event-dispatcher\\\/EventDispatcher.php(44): Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher->doDispatch(Array, 'file.beforerena...', Object(Symfony\\\\Component\\\\EventDispatcher\\\\GenericEvent))\\n#3 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(48): Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher->dispatch('file.beforerena...', Object(Symfony\\\\Component\\\\EventDispatcher\\\\GenericEvent))\\n#4 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/private\\\/Files\\\/View.php(884): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'rename')\\n#5 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Directory.php(471): OC\\\\Files\\\\View->rename('\\\/test.txt', '\\\/subfolder\\\/test...')\\n#6 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Tree.php(164): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Directory->moveInto('test.txt', 'test.txt', Object(OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File))\\n#7 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(641): Sabre\\\\DAV\\\\Tree->move('test.txt', 'subfolder\\\/test....')\\n#8 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(96): Sabre\\\\DAV\\\\CorePlugin->httpMove(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#9 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(464): Sabre\\\\DAV\\\\Server->emit('method:MOVE', Array)\\n#10 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(241): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#11 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(309): Sabre\\\\DAV\\\\Server->start()\\n#12 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/publicwebdav.php(95): Sabre\\\\DAV\\\\Server->exec()\\n#13 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/public.php(85): require_once('\\\/home\\\/artur\\\/www...')\\n#14 {main}\",\"File\":\"\\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/files_classifier\\\/lib\\\/Handler.php\",\"Line\":137}"}
@ownclouders
Copy link
Contributor

GitMate.io thinks the contributors most likely able to help are @ownclouders, and @phil-davis.

Possibly related issues are #481 (moving files), #8103 (Move File), #7152 (Public upload: files don't appear), #29554 (overwriting a file with a folder and a folder with a file needs better error reporting), and #29599 (a file called "0" cannot be uploaded by chunking).

@individual-it
Copy link
Member Author

similar when uploading and overwriting a file on the public share

{"reqId":"YXlrVEX8k3SPL1Od537Q","level":4,"time":"2018-11-12T09:36:19+00:00","remoteAddr":"172.17.0.2","user":"--","app":"webdav","method":"PUT","url":"\/owncloud-core\/public.php\/webdav\/lorem.txt","message":"Exception: Call to a member function getId() on null: {\"Exception\":\"Error\",\"Message\":\"Call to a member function getId() on null\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/files_classifier\\\/lib\\\/Handler.php(363): OCA\\\\FilesClassifier\\\\Handler->getAllNodeIds(Object(OC\\\\Files\\\\Node\\\\Folder), true)\\n#1 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/symfony\\\/event-dispatcher\\\/EventDispatcher.php(212): OCA\\\\FilesClassifier\\\\Handler->moveAndCopyListener(Object(Symfony\\\\Component\\\\EventDispatcher\\\\GenericEvent), 'file.beforecopy', Object(Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher))\\n#2 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/symfony\\\/event-dispatcher\\\/EventDispatcher.php(44): Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher->doDispatch(Array, 'file.beforecopy', Object(Symfony\\\\Component\\\\EventDispatcher\\\\GenericEvent))\\n#3 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/public\\\/Events\\\/EventEmitterTrait.php(48): Symfony\\\\Component\\\\EventDispatcher\\\\EventDispatcher->dispatch('file.beforecopy', Object(Symfony\\\\Component\\\\EventDispatcher\\\\GenericEvent))\\n#4 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/private\\\/Files\\\/View.php(991): OC\\\\Files\\\\View->emittingCall(Object(Closure), Array, 'file', 'copy')\\n#5 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/files_versions\\\/lib\\\/Storage.php(203): OC\\\\Files\\\\View->copy('files\\\/simple-fo...', 'files_versions\\\/...')\\n#6 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/files_versions\\\/lib\\\/Hooks.php(58): OCA\\\\Files_Versions\\\\Storage::store('simple-folder\\\/l...')\\n#7 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/private\\\/legacy\\\/hook.php(105): OCA\\\\Files_Versions\\\\Hooks::write_hook(Array)\\n#8 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(346): OC_Hook::emit('OC_Filesystem', 'write', Array)\\n#9 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php(240): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->emitPreHooks(true)\\n#10 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1133): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->put(Resource id #72)\\n#11 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(515): Sabre\\\\DAV\\\\Server->updateFile('lorem.txt', Resource id #72, NULL)\\n#12 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(96): Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#13 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(464): Sabre\\\\DAV\\\\Server->emit('method:PUT', Array)\\n#14 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(241): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#15 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(309): Sabre\\\\DAV\\\\Server->start()\\n#16 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/publicwebdav.php(95): Sabre\\\\DAV\\\\Server->exec()\\n#17 \\\/home\\\/artur\\\/www\\\/owncloud-core\\\/public.php(85): require_once('\\\/home\\\/artur\\\/www...')\\n#18 {main}\",\"File\":\"\\\/home\\\/artur\\\/www\\\/owncloud-core\\\/apps\\\/files_classifier\\\/lib\\\/Handler.php\",\"Line\":137}"}

@paurakhsharma
Copy link
Member

Unable to reproduce in my master and stable10.

@davitol
Copy link
Contributor

davitol commented Feb 20, 2019

@individual-it Tested in 10.1.0.4 and works fine for me. Cannot reproduce this issue. If you are able to reproduce it again, do not hesitate to reopen the ticket. Thanks for reporting!

@davitol davitol closed this as completed Feb 20, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants