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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users with access to a shared folder within group folders (but not to the group folder) cannot upload files #1507

Closed
ssaavedra opened this issue May 23, 2021 · 3 comments
Labels
0. Needs triage Issues that need to be triaged bug

Comments

@ssaavedra
Copy link

How to use GitHub

  • Please use the 馃憤 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Create a group "testgroup", and add admin user to it
  2. Create another user "testuser2" (don't add it to testgroup)
  3. Admin user: go to Settings > Group folders > Create a group folder "gf" and share it with a group "testgroup"
  4. Admin user: go to folder > Create folder "subfolder1"
  5. Admin user: go to "subfolder1" > Sharing > Share with "testuser2"
  6. testuser2: Log in (e.g., incognito) > See you have "subfolder1" at root (but not "gf")
  7. testuser2: You will be able to create a markdown file successfully
  8. testuser2: Try to upload a file to the subfolder by drag-and-drop from file explorer to browser (or configure desktop client). It will not work.

Expected behaviour

Files should work as they do in any other folder.

Actual behaviour

After the progress bar finishes, a message "Could not rename part file to final file" is shown on the top right.
image

From the server logs, it seems that the folder is mistakenly taken as if the shared folder were a "root share" (like the __groupfolders or the per-user folders inside nextcloud/data).

This prevents the use case of read-write shared folders inside a group folder.

Server configuration

Operating system: Docker image (nextcloud:21) running over Debian 9

Web server: Apache 2 (Docker image)

Database: SQLite3 3.27.2 (Docker image)

PHP version: 7.4.19 (Docker image)

Nextcloud version: 21.0.2 (also 20.0.9)

Group folders version: 9.0.1

Updated from an older Nextcloud/ownCloud or fresh install: updated, this is happening to us both on 20.0.9 and 21.0.2

Where did you install Nextcloud from: Docker Hub

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Any, tested on Firefox and Desktop Client

Operating system: Any, tested on Linux (Manjaro, Fedora) and Windows 10

Logs

Web server error log

Web server error log 192.168.67.3 - - [23/May/2021:18:16:29 +0000] "PUT /remote.php/webdav/subfolder1/samplepicture.png HTTP/1.1" 500 812 "-" "Mozilla/5.0 XXXX"

Nextcloud log (data/nextcloud.log)

Nextcloud log {"reqId":"24kRNBNmHBkIvjfqoiE0","level":3,"time":"2021-05-23T18:16:30+00:00","remoteAddr":"XXXX","user":"testuser2","app":"core","method":"PUT","url":"/remote.php/webdav/subfolder1/samplepicture.png","message":"unable to rename, source directory is not writable : /var/www/html/data/subfolder1","userAgent":"Mozilla/5.0 XXXX","version":"21.0.2.1"} {"reqId":"24kRNBNmHBkIvjfqoiE0","level":3,"time":"2021-05-23T18:16:30+00:00","remoteAddr":"XXXX","user":"testuser2","app":"webdav","method":"PUT","url":"/remote.php/webdav/subfolder1/samplepicture.png","message":"renaming part file to final file failed $renameOkay: false, $fileExists: false)","userAgent":"Mozilla/5.0 XXXX","version":"21.0.2.1"} {"reqId":"24kRNBNmHBkIvjfqoiE0","level":4,"time":"2021-05-23T18:16:30+00:00","remoteAddr":"XXXX","user":"testuser2","app":"webdav","method":"PUT","url":"/remote.php/webdav/subfolder1/samplepicture.png","message":{"Exception":"Sabre\\DAV\\Exception","Message":"Could not rename part file to final file","Code":0,"Trace":[{"file":"/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["samplepicture.png",null]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["subfolder1/samplepicture.png",null,null]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:PUT",[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v1/webdav.php","line":84,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":167,"args":["/var/www/html/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":296,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 XXXX","version":"21.0.2.1"}

Browser log

Browser log ``` PUT | https://my_nextcloud_hostname/remote.php/webdav/subfolder1/samplepicture.png ```
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception</s:exception>
  <s:message>Could not rename part file to final file</s:message>
</d:error>
</details>
@ssaavedra ssaavedra added 0. Needs triage Issues that need to be triaged bug labels May 23, 2021
@solracsf
Copy link
Member

Fixed by nextcloud/server#26980?

@variantolog
Copy link

It's duplicate of #1445 and #1453.

@fschrempf
Copy link
Contributor

Closed as duplicate of #1445 and #1453

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Issues that need to be triaged bug
Projects
None yet
Development

No branches or pull requests

4 participants