"Upload failed" when modifying a file shared with me

Please help us by providing the following info.

Steps to reproduce
1. Another user on the same ownCloud server shares a text file with me.
2. They have checked the boxes to allow me to modify, delete, etc. this file
3. I can edit the text file just fine while logged in via a web browser, but editing the file with the official Android app gives an "upload failed" error message every time.
4. The same behavior occurs when I share a file with another user, so the issue is not specific to my user account.
5. The same behavior occurs when sharing a folder. The person the folder is shared with can modify the contents via web browser, but "upload failed" when creating or modifying a file via the android app.

Expected behaviour
If a folder or file is shared with me, and I'm given full modify/delete, I should be able to edit the files via the android app as if they are my own files.

Actual behaviour
"upload failed" message.

Mobile client configuration
Client OS (iOS, Android, ...): Android
Client version: 4.4.4

Server configuration
Operating system: CentOS 7
Web server: Apache 2.4
Database: MariaDB
PHP version: 5.5
ownCloud version (see ownCloud admin page): 9.1
Updated from an older ownCloud or fresh install: Updated from a freshly installed 9.0
ownCloud log (data/owncloud.log):
{"reqId":"V65t760XpFR0iUtrTwMLPAAAAAk","remoteAddr":"10.3.3.107","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 507 Insufficient Storage\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\InsufficientStorage\",\"Code\":0,\"Trace\":\"#0 [internal function]: OCA\\\\DAV\\\\Connector\\\\Sabre\\\\QuotaPlugin->checkQuota('Grocery_List.tx...', Object(OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File), Resource id #476, false)\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1068): Sabre\\\\Event\\\\EventEmitter->emit('beforeWriteCont...', Array)\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(511): Sabre\\\\DAV\\\\Server->updateFile('Grocery_List.tx...', Resource id #476, NULL)\\n#4 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPut(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:PUT', Array)\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/html\\\/o...')\\n#10 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/QuotaPlugin.php\",\"Line\":108,\"User\":\"george\"}","level":4,"time":"2016-08-12T20:46:40-04:00","method":"PUT","url":"\/owncloud\/remote.php\/webdav\/Grocery_List.txt","user":"george"}

Special configurations (external storage, external authentication, reverse proxy, server-side-encryption): none

Hmmmm ok, this may not be specific to the android app after all. I also get the exact same result from the iPad app too...

Oops, looks like this is a known bug with ownCloud 9.1 and it will be fixed in 9.1.1 according to this:

So this thread can be closed.

Thanks for sharing your findings. Hopefully 9.1.1 will be out soon with the fix.

As 9.1.1 is planned for 2016-09-20 i'd like to patch my 9.1.0 before.
I'v seen the https://github.com/owncloud/core/issues/25582 thread and https://github.com/owncloud/core/commit/6f4ba321613ddf406fa0fcbb1228e89ca35e8425.patch
I try it, but :
patch sharedstorage.php < sharedstorage.patch
patching file sharedstorage.php_
Hunk #1 FAILED at 108._
1 out of 1 hunk FAILED -- saving rejects to file sharedstorage.php.rej

with :

pwd
/var/www/html/owncloud/apps/filessharing/lib_
_[root@myvps lib]# cat sharedstorage.patch _
@@ -108,6 +108,16 @@ private function init() {
_ }_
_ _
_ /**_
+ * @inheritdoc
+ */
+ public function instanceOfStorage($class) {
+ if (inarray($class, ['\OC\Files\Storage\Home', '\OC\Files\ObjectStore\HomeObjectStoreStorage'])) {_
+ return false;
+ }
+ return parent::instanceOfStorage($class);
+ }
+
+ /**
_ * @return string_
_ */_
_ public function getShareId() {_

I'm on centos 7 and i use the http://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.rep repo
My ownCloud version with this repo is :
owncloud-files-9.1.0-1.1.noarch

How could i patch before the 9.1.1 release ?
Thx

If you don't have the knowledge to apply such fixes please use the RC1 of 9.1.1 instead:

As the bug is known, already fixed, alternatives to manually patching are available and no further discussion is needed i'm closing here.