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/out of shared storage is broken #4327

Closed
rullzer opened this issue Apr 12, 2017 · 3 comments
Closed

Moving files in/out of shared storage is broken #4327

rullzer opened this issue Apr 12, 2017 · 3 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug high regression

Comments

@rullzer
Copy link
Member

rullzer commented Apr 12, 2017

  1. have two users user1 and user2
  2. user1 creates a folder foo
  3. user1 creates test.txt inside foo
  4. user1 shares foo with user2 with fill access
  5. user2 tries to move test.txt out of foo

Expected:
File is moved and all is right with the world

Actual:
Forbidden. And not all is right in the world

@rullzer rullzer added 1. to develop Accepted and waiting to be taken care of bug high regression labels Apr 12, 2017
@rullzer rullzer added this to the Nextcloud 12.0 milestone Apr 12, 2017
@rullzer
Copy link
Member Author

rullzer commented Apr 12, 2017

My bet is this is introduced with the disabling of the encryption wrapper. Since that turned a move in/out of a shared storage in a copy (which is not right!).

@icewind1991 I need your FS knowledge to solve this properly.

@rullzer
Copy link
Member Author

rullzer commented Apr 12, 2017

As far as I can tell the issue is that the rootpath is set relative to the owner of a shared storage in https://github.com/nextcloud/server/blob/master/apps/files_sharing/lib/SharedStorage.php#L119

Which then breaks https://github.com/nextcloud/server/blob/master/lib/private/Files/Storage/Local.php#L435

Since the rename breaks on $sourceStorage->getSourcePath($sourceInternalPath) because that returns somethings like files/foo/test.txt which is basically missing the owner part.

@icewind1991
Copy link
Member

Fix is here: #4329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug high regression
Projects
None yet
Development

No branches or pull requests

2 participants