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

File Drop not possible for Group Folders? #20199

Closed
pionsys-mha opened this issue Mar 27, 2020 · 11 comments
Closed

File Drop not possible for Group Folders? #20199

pionsys-mha opened this issue Mar 27, 2020 · 11 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@pionsys-mha
Copy link

I am able to share a folder from a user via "Share link" and "File drop (upload only)".
Afterwards, the file drop is possible with and without password (I tried both approaches for two different folders).

Contrary, in case a share a folder from below a group folder via the same steps, the file drop fails. At the file drop web page, a notification about "could not upload filename" appears.

Within the log, the following error appears:

[public] Error: Error: Call to a member function getType() on boolean at <>

  1. <>
    OCA\DAV\Connector\Sabre\ServerFactory->OCA\DAV\Connector\Sabre{closure}("*** sensitive parameters replaced ***")
  2. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php line 105
    call_user_func_array(Closure {}, ["*** sensitive ... "])
  3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 466
    Sabre\Event\EventEmitter->emit("beforeMethod", ["*** sensitive ... "])
  4. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 254
    Sabre\DAV\Server->invokeMethod("*** sensitive parameter replaced ", " sensitive parameter replaced ***")
  5. /var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php line 109
    Sabre\DAV\Server->exec()
  6. /var/www/nextcloud/public.php line 81
    require_once("/var/www/nextcl ... p")

PUT /public.php/webdav/Super%20Test.txt

Steps to reproduce

See above.

Expected behaviour

I think that the file drop should work with folders below a group folder like it works with folders below a user folder.

Actual behaviour

The file drop seems to work only with folders below a user folder.

Server configuration

Operating system:
Ubuntu V 18.04.4

Nextcloud version: (see Nextcloud admin page)
V 18.0.3

Updated from an older Nextcloud/ownCloud or fresh install:
fresh install of V 18.0.2 last week, this error was present also in V 18.0.2

Where did you install Nextcloud from:
www.hanssonit.se

@pionsys-mha pionsys-mha added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Mar 27, 2020
@ALLNL
Copy link

ALLNL commented Sep 16, 2020

This problem still exists in Nextcloud 19.0.3, is there any update or solution about this?

@andyrue
Copy link

andyrue commented Nov 12, 2020

I'm also experiencing this on a fresh install of 20.0.1. Some further information. If I set the share to Upload and Edit permission, I can upload a file to the group folder using an anonymous session. If I change it back to Filedrop (Upload Only) it errors with "Could not upload 'filename'". In addition to the error mentioned by the OP, there is also this.

"reqId":"9rkTfH0YOWtOeYIBABHQ","level":3,"time":"2020-11-12T20:20:49+00:00","remoteAddr":"172.16.4.10","user":"--","app":"no app in context","method":"PUT","url":"/public.php/webdav/image.jpg","message":{"Exception":"OCP\\Files\\NotFoundException","Message":"","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/previewgenerator/lib/Listeners/PostWriteListener.php","line":66,"function":"getId","class":"OC\\Files\\Node\\NonExistingFile","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php","line":76,"function":"handle","class":"OCA\\PreviewGenerator\\Listeners\\PostWriteListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":251,"function":"__invoke","class":"OC\\EventDispatcher\\ServiceEventListener","type":"->"},{"file":"/var/www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php","line":73,"function":"callListeners","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":86,"function":"dispatch","class":"Symfony\\Component\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php","line":98,"function":"dispatch","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/HookConnector.php","line":119,"function":"dispatchTyped","class":"OC\\EventDispatcher\\EventDispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Hook.php","line":110,"function":"postWrite","class":"OC\\Files\\Node\\HookConnector","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":415,"function":"emit","class":"OC_Hook","type":"::"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php","line":340,"function":"emitPostHooks","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php","line":155,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":1104,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":527,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php","line":113,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/public.php","line":81,"args":["/var/www/nextcloud/apps/dav/appinfo/v1/publicwebdav.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Files/Node/NonExistingFile.php","Line":53,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15","version":"20.0.1.1"

@Picannick
Copy link

Absolutly sam issues:

Fatal webdav Error: Call to a member function getType() on bool
/var/www/virtual/xxxx.xxxxx.xx/htdocs/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:
OCA\DAV\Connector\Sabre\ServerFactory->OCA\DAV\Connector\Sabre{closure}("*** sensiti ... ")
/var/www/virtual/xxxx.xxxxx.xx/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 458:
Sabre\DAV\Server->emit("beforeMethod:PUT", [ "
** sensi ... "])
/var/www/virtual/xxxx.xxxxx.xx/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 251:
Sabre\DAV\Server->invokeMethod("*** sensiti ... ", "** sensiti ... *")
/var/www/virtual/xxxx.xxxxx.xx/htdocs/3rdparty/sabre/dav/lib/DAV/Server.php - line 319:
Sabre\DAV\Server->start()
/var/www/virtual/xxxx.xxxxx.xx/htdocs/apps/dav/appinfo/v1/publicwebdav.php - line 113:
Sabre\DAV\Server->exec()
/var/www/virtual/xxxx.xxxxx.xx/htdocs/public.php - line 81:
require_once("/var/www/vi ... p")

@lflinders
Copy link

lflinders commented Feb 11, 2021

We are also seeing the same issues.

Interestingly if you try and upload the same file a second time, it will still present the error, but the file will be uploaded.
We also see the same things happening for deleting files.

Also if i set the share link to "allow upload and editing" i get a different error

"path needs to be relative to the system wide data folder and point to a user specific file"

Which seems to tie this together with the issue raised here
#14988

And this seems to be the only given solution, worked for me
#14988 (comment)

@devz3r0
Copy link

devz3r0 commented Mar 1, 2021

It works only if you turn off advanced permission in the groupfolder root where the drop-folder is in.

@paulRbr
Copy link

paulRbr commented Mar 16, 2021

Related issue on the groupfolders app: nextcloud/groupfolders#486

@fschrempf
Copy link

I tried to reproduce this on a clean NC 21.0..0 and groupfolders 9.0.0 and it seems like this issue does not happen there. Can anyone confirm?

@devz3r0
Copy link

devz3r0 commented Mar 28, 2021

I tried to reproduce this on a clean NC 21.0..0 and groupfolders 9.0.0 and it seems like this issue does not happen there. Can anyone confirm?

Did you add some users into the extra permissions tab?

@fschrempf
Copy link

Did you add some users into the extra permissions tab?

No, I don't think so. I only enabled ACL.

@jngrb
Copy link

jngrb commented Mar 31, 2021

As I also commented on in nextcloud/groupfolders#486, I can confirm that with enabled ACL and extra permissions set for various groups (I didn't test with users - but I guess that working, too), it now works for NC 21 / groupfolders 9 (while it didn't work in NC 20 / groupfolders 8).

@fschrempf
Copy link

This should be fixed in recent stable releases (see nextcloud/groupfolders#1224).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

9 participants