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

No upload to shared folder possible after update to 14.0.1 (S3 primary storage) #11637

Closed
bzdega opened this issue Oct 5, 2018 · 13 comments
Closed

Comments

@bzdega
Copy link

bzdega commented Oct 5, 2018

Hi,

after updating 3 of my Nextcloud instances to NC 14.0.1, i now have a very bad issue with shared folders.

When uploading or creating files to a shared folder a message occures:

Could not write file contents

and the upload breaks off.

Here is the output of my Nextcloud.log:

Fatal webdav Sabre\DAV\Exception: Could not write file contents

/var/www/virtual/bz5/html/apps/dav/lib/Connector/Sabre/Directory.php - line 156:

OCA\DAV\Connector\Sabre\File->put(null)

/var/www/virtual/bz5/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:

OCA\DAV\Connector\Sabre\Directory->createFile("test2.txt", null)

/var/www/virtual/bz5/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 529:

Sabre\DAV\Server->createFile("files/marku ... t", null, null)

Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

/var/www/virtual/bz5/html/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:

call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])

/var/www/virtual/bz5/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:

Sabre\Event\EventEmitter->emit("method:PUT", [ Sabre\HTTP ... }])

/var/www/virtual/bz5/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:

Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})

/var/www/virtual/bz5/html/apps/dav/lib/Server.php - line 293:

Sabre\DAV\Server->exec()

/var/www/virtual/bz5/html/apps/dav/appinfo/v2/remote.php - line 35:

OCA\DAV\Server->exec()

/var/www/virtual/bz5/html/remote.php - line 163:

require_once("/var/www/vi ... p")

This is really bad, because the shared folders are useless now.

Any chance to get this fixed soon?

best regards,

Michael

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #11509 (Corrupted DB after update to 14.0.1), #4679 (Issues after update to 12.0), #9815 (No update 13.0.3 possible), #10429 (All contacts disappears after 4.0.0 Beta 1 update), and #11361 (Increase version for 14.0.1).

@MorrisJobke
Copy link
Member

after updating 3 of my Nextcloud instances to NC 14.0.1, i now have a very bad issue with shared folders.

I could not reproduce this issue. :/ In https://help.nextcloud.com/t/help-testing-rc1-version-of-14-0-2-13-0-7-and-12-0-12/38359/26?u=morrisjobke it is reported to also don't work in 14.0.2 RC2.

I just tested this again in two different setups and both work fine with old as well as new shares as owner and recipient.

@MorrisJobke
Copy link
Member

Could not write file contents

Are the permissions on the filesystem are correct? Is the filesystem also not filled up completely? Maybe some quota is set for the webserver user? Could you try to copy the file to the filesystem as web server user to check that the filesystem works correct?

@bzdega
Copy link
Author

bzdega commented Oct 11, 2018

Hi Morris,

is use only S3-Objectstorage (as primary storage). So there is no chance to set any permission on the S3-Buckets. It worked perfect since the upgrade to 14.0.1. The permissions are completly handled by the NC instance.

@bzdega
Copy link
Author

bzdega commented Oct 11, 2018

what about the errors in the nextcloud.log?

Fatal webdav Sabre\DAV\Exception: Could not write file contents

@bzdega
Copy link
Author

bzdega commented Oct 11, 2018

the upload to all other folders is working well, only when you try to upload/create a file or folder to a folder which is shared by another user, these error occures.

@MorrisJobke
Copy link
Member

@rullzer @icewind1991 This looks weird 🐟

@MorrisJobke MorrisJobke added this to the Nextcloud 14.0.3 milestone Oct 11, 2018
@MorrisJobke MorrisJobke changed the title No upload to shared folder possible after update to 14.0.1 No upload to shared folder possible after update to 14.0.1 (S3 primary storage) Oct 11, 2018
@rullzer
Copy link
Member

rullzer commented Oct 11, 2018

I can reproduce this.
I'll dive into it.

@rullzer rullzer self-assigned this Oct 11, 2018
@bzdega
Copy link
Author

bzdega commented Oct 11, 2018

thank you!!!

rullzer added a commit that referenced this issue Oct 11, 2018
Fixes #11637

When writing a file to the root of a shared storage we have to obtain
creatable information on the root of the share. However getting the
dirname of the path then results in '.'. Passing this along potentially
breaks.

For example objectstores do not have the same hierachy as a normal fs.
So the file '.' doesn't mean anything in that context.

Signed-off-by: Roeland Jago Douma <[email protected]>
@rullzer
Copy link
Member

rullzer commented Oct 11, 2018

Fix should be in #11764 could you check that?

rullzer added a commit that referenced this issue Oct 11, 2018
Fixes #11637

If we do not normalize the unjailed path we might end up with a path
like files/user/folder/. which can break on objectstores

Signed-off-by: Roeland Jago Douma <[email protected]>
@bzdega
Copy link
Author

bzdega commented Oct 11, 2018

ahh... what can i do to check this?

@MorrisJobke
Copy link
Member

ahh... what can i do to check this?

Adjust the file manually - just apply the changes from https://github.com/nextcloud/server/pull/11764/files in your Nextcloud instance.

rullzer added a commit that referenced this issue Oct 11, 2018
Fixes #11637

If we do not normalize the unjailed path we might end up with a path
like files/user/folder/. which can break on objectstores

Signed-off-by: Roeland Jago Douma <[email protected]>
rullzer added a commit that referenced this issue Oct 11, 2018
Fixes #11637

If we do not normalize the unjailed path we might end up with a path
like files/user/folder/. which can break on objectstores

Signed-off-by: Roeland Jago Douma <[email protected]>
@rullzer
Copy link
Member

rullzer commented Oct 11, 2018

@bzdega as you use S3 and seem to administer a few Nextcloud instances I can only imagine they are not your average small home setups. You might want to checkout a support subscription. That way you are ensured of quick access to our engineers.

weeman1337 pushed a commit that referenced this issue Oct 28, 2018
Fixes #11637

If we do not normalize the unjailed path we might end up with a path
like files/user/folder/. which can break on objectstores

Signed-off-by: Roeland Jago Douma <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants