nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.56k stars 4.08k forks source link

Users with a quota of 1 Bytes cannot upload data on a shared folder with the desktop client. #6354

Closed recretix closed 7 years ago

recretix commented 7 years ago

Steps to reproduce

  1. Create a share with a user with unlimited quota.
  2. Share it with a user which got a quota of 1 Byte.
  3. Upload data to the shared folder with the user which got a quota of 1 Bytes with the nextcloud windows client (2.3.2 Build 1). 4.With the webclient it is possible to upload data to the shared folder.

Expected behaviour

The user should be able to upload data to the shared folder.

Actual behaviour

The user receives the following error message: Insufficient Storage (Sabre\DAV\Exception\InsufficientStorage)

General server configuration

Operating system: Linux RB00SRV061 4.8.0-58-generic #63~16.04.1-Ubuntu SMP Mon Jun 26 18:08:51 UTC 2017 x86_64

Web server: Apache/2.4.18 (Ubuntu) (apache2handler)

Database: mysql 10.0.31

PHP version: 7.0.22-0ubuntu0.16.04.1

PHP-modules loaded ``` - Core - date - libxml - openssl - pcre - zlib - filter - hash - Reflection - SPL - session - standard - apache2handler - mysqlnd - PDO - xml - apcu - bz2 - calendar - ctype - curl - dom - mbstring - fileinfo - ftp - gd - gettext - gmp - iconv - intl - json - ldap - exif - mcrypt - mysqli - pdo_mysql - pdo_sqlite - Phar - posix - readline - shmop - SimpleXML - sockets - sqlite3 - sysvmsg - sysvsem - sysvshm - tokenizer - wddx - xmlreader - xmlwriter - xsl - zip - Zend OPcache ```

Nextcloud configuration

Nextcloud version: 12.0.2 - 12.0.2.0

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 11.0.4

Where did you install Nextcloud from: tar.bz2 from Webpage

Are you using external storage, if yes which one: files_external is disabled

Are you using encryption: no

Are you using an external user-backend, if yes which one: YOUR ANSWER HERE (LDAP/ActiveDirectory/Webdav/...)

Signing status ``` [] ```
Enabled apps ``` - activity: 2.5.2 - admin_notifications: 1.0.0 - bruteforcesettings: 1.0.2 - calendar: 1.5.3 - comments: 1.2.0 - dav: 1.3.0 - deck: 0.2.1 - drawio: 0.8.8 - federatedfilesharing: 1.2.0 - files: 1.7.2 - files_markdown: 1.0.1 - files_pdfviewer: 1.1.1 - files_sharing: 1.4.0 - files_texteditor: 2.4.1 - files_trashbin: 1.2.0 - files_versions: 1.5.0 - files_videoplayer: 1.1.0 - firstrunwizard: 2.1 - gallery: 17.0.0 - groupfolders: 1.1.0 - issuetemplate: 0.2.2 - keeweb: 0.4.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - nextant: 1.0.8 - nextcloud_announcements: 1.1 - notifications: 2.0.0 - oauth2: 1.0.5 - onlyoffice: 1.1.3 - ownbackup: 17.5.0 - password_policy: 1.2.2 - provisioning_api: 1.2.0 - serverinfo: 1.2.0 - sharebymail: 1.2.0 - spreed: 2.0.1 - survey_client: 1.0.0 - tasks: 0.9.5 - theming: 1.3.0 - twofactor_backupcodes: 1.1.1 - updatenotification: 1.2.0 - weather: 1.5.0 - workflowengine: 1.2.0 ```
Disabled apps ``` - activitylog - admin_audit - contacts - encryption - federation - files_external - systemtags - user_external - user_ldap ```
Content of config/config.php ``` { "instanceid": "ocgdaki4wkwv", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "127.0.0.1", "nextcloud.recretix.ch" ], "datadirectory": "\/sdb_data\/owncloud\/data\/", "overwrite.cli.url": "https:\/\/nextcloud.recretix.ch\/", "dbtype": "mysql", "version": "12.0.2.0", "dbname": "ocdb", "dbhost": "localhost", "dbtableprefix": "oc_", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "ldapIgnoreNamingRules": false, "memcache.local": "\\OC\\Memcache\\APCu", "mail_smtpmode": "smtp", "maintenance": false, "loglevel": 0, "theme": "", "mail_smtpsecure": "ssl", "mail_from_address": "notifications", "mail_domain": "recretix.ch", "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_smtphost": "mail.cyon.ch", "mail_smtpport": "465", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "session_lifetime": 5400, "updater.release.channel": "stable", "updater.secret": "***REMOVED SENSITIVE VALUE***" } ```

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Operating system: Windows 10

Logs

Web server error log ``` Insert your webserver log here ```
Nextcloud log (data/nextcloud.log) ``` #=#=#=# Syncrun started 2017-09-04T11:25:22 #=#=#=#=# Propagation starts 2017-09-04T11:25:22 (last step: 83 msec, total: 83 msec) ||Test_Share/E - Copy.txt|INST_ERROR|Up|1504515955||9||6|The item is not synced because of previous errors: Error transferring https://nextcloud.recretix.ch/remote.php/dav/files/Test/Test_Share/E - Copy.txt - server replied: Insufficient Storage (Sabre\DAV\Exception\InsufficientStorage)|0|0|0|||INST_NONE| ||Test_Share/E.txt|INST_ERROR|Up|1504515955||9||6|The item is not synced because of previous errors: Error transferring https://nextcloud.recretix.ch/remote.php/dav/files/Test/Test_Share/E.txt - server replied: Insufficient Storage (Sabre\DAV\Exception\InsufficientStorage)|0|0|0|||INST_NONE| ||Test_Share/sap - Copy.txt|INST_ERROR|Up|1503393144||302||6|The item is not synced because of previous errors: Error transferring https://nextcloud.recretix.ch/remote.php/dav/files/Test/Test_Share/sap - Copy.txt - server replied: Insufficient Storage (Sabre\DAV\Exception\InsufficientStorage)|0|0|0|||INST_NONE| ||Test_Share/sap.txt|INST_ERROR|Up|1503393144||302||6|The item is not synced because of previous errors: Error transferring https://nextcloud.recretix.ch/remote.php/dav/files/Test/Test_Share/sap.txt - server replied: Insufficient Storage (Sabre\DAV\Exception\InsufficientStorage)|0|0|0|||INST_NONE| #=#=#=# Syncrun finished 2017-09-04T11:25:22 (last step: 66 msec, total: 149 msec) ```
MorrisJobke commented 7 years ago

Steps to reproduce:

rullzer commented 7 years ago

The quota is applied to tightly on the storage I think. I'll see if I can dive into it and else drag @icewind1991 in

rullzer commented 7 years ago

Ok so it is actually happening in https://github.com/nextcloud/server/blob/master/apps/dav/lib/Connector/Sabre/QuotaPlugin.php#L108

As the view of the quota plugin in '/user/files' if then '/upload/foo/bar' is appended things do :boom:

bpcurse commented 7 years ago

Steps to reproduce:

Is this caused by the same circumstances that were discussed above or is this an independent issue? (nextcloud server 12.0.2, client Linux 2.3.2, built on git-rev 820899)

rullzer commented 7 years ago

I found the issue a patch is on the way.

rullzer commented 7 years ago

Fix in #6483