Storage space not released after external storage upload failure
Steps to reproduce
- Upload large file that exceeds ldap users external storage (SMB) quota - 1GB
Expected behaviour
If a upload fails due to quota exceeded or transfer failure to the external storage SMB share, the partial file should be cleared (deleted) to free up the drive space. Perhaps nextcloud could be aware through the SMB server that such a quota exists when it negotiates the transfer?
Actual behaviour
The transfer fails, the user gets "internal server error" and the partial file eats up the remaining storage of the users external share.
Server configuration
Ubuntu 16.04.3 LTS Apache/2.4.18 (Ubuntu) MariaDB-10.2.8 PHP 7.0.22 Nextcloud 12.0.3 Fresh install using the prebuilt VM
No errors have been found.
List of activated apps: Enabled:
- activity: 2.5.2
- calendar: 1.5.5
- comments: 1.2.0
- contacts: 1.5.3
- dav: 1.3.0
- federatedfilesharing: 1.2.0
- federation: 1.2.0
- files: 1.7.2
- files_accesscontrol: 1.2.5
- files_external: 1.3.0
- 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
- logreader: 2.0.0
- lookup_server_connector: 1.0.0
- nextcloud_announcements: 1.1
- notifications: 2.0.0
- oauth2: 1.0.5
- password_policy: 1.2.2
- previewgenerator: 1.0.7
- provisioning_api: 1.2.0
- quota_warning: 1.1.0
- serverinfo: 1.2.0
- sharebymail: 1.2.0
- survey_client: 1.0.0
- systemtags: 1.2.0
- theming: 1.3.0
- twofactor_backupcodes: 1.1.1
- updatenotification: 1.2.0
- user_ldap: 1.2.1
- workflowengine: 1.2.0 Disabled:
- admin_audit
- encryption
- files_retention
- user_external
Nextcloud configuration:
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"192.168.100.63",
"nextcloud",
"nextcloud"
],
"datadirectory": "\/var\/ncdata",
"overwrite.cli.url": "https:\/\/nextcloud\/",
"dbtype": "mysql",
"version": "12.0.3.3",
"dbname": "nextcloud_db",
"dbhost": "localhost",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "oc989awy4zxd",
"maintenance": false,
"mail_smtpmode": "smtp",
"memcache.local": "\\OC\\Memcache\\Redis",
"filelocking.enabled": true,
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "\/var\/run\/redis\/redis.sock",
"port": 0,
"timeout": 0,
"dbindex": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"htaccess.RewriteBase": "\/",
"loglevel": "2",
"log_type": "file",
"logfile": "\/var\/ncdata\/nextcloud.log",
"logtimezone": "Asia\/Jerusalem",
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory"
}
}
**Are you using external storage, if yes which one: smb (Windows)
**Are you using encryption: no
**Are you using an external user-backend, if yes which one: ActiveDirectory
| Configuration | s02 |
| hasMemberOfFilterSupport | 1
| hasPagedResultSupport |
| homeFolderNamingRule |
| lastJpegPhotoLookup | 0
| ldapAgentName | CN=ruckusradius,CN=Users,DC=ACADEMY,DC=DCname,DC=AC,DC=IL
| ldapAgentPassword | ***
| ldapAttributesForGroupSearch |
| ldapAttributesForUserSearch |
| ldapBackupHost |
| ldapBackupPort |
| ldapBase | DC=ACADEMY,DC=DCname,DC=AC,DC=IL
| ldapBaseGroups | DC=ACADEMY,DC=DCname,DC=AC,DC=IL
| ldapBaseUsers | DC=ACADEMY,DC=DCname,DC=AC,DC=IL
| ldapCacheTTL | 600
| ldapConfigurationActive | 1
| ldapDefaultPPolicyDN |
| ldapDynamicGroupMemberURL |
| ldapEmailAttribute |
| ldapExperiencedAdmin | 0
| ldapExpertUUIDGroupAttr |
| ldapExpertUUIDUserAttr |
| ldapExpertUsernameAttr | sAMAccountName
| ldapGidNumber | gidNumber
| ldapGroupDisplayName | cn
| ldapGroupFilter | (&(|(objectclass=group))(|(cn=Students)(cn=Teachers)(cn=Assistants)))
| ldapGroupFilterGroups | Students;Teachers;Assistant
| ldapGroupFilterMode | 0
| ldapGroupFilterObjectclass | group
| ldapGroupMemberAssocAttr | member
| ldapHost | ldap://ldappServer.academy.DCname.ac.il
| ldapIgnoreNamingRules |
| ldapLoginFilter | (&(&(|(objectclass=person))(|(|(memberof=CN=Students,CN=Users,DC=ACADEMY,DC=DCname,DC=AC,DC=IL)(primaryGroupID=1003))(|(memberof=CN=Teachers,CN=Users,DC=ACADEMY,DC=DCname,DC=AC,DC=IL)(primaryGroupID=1005))(|(memberof=CN=Assistant,CN=Users,DC=ACADEMY,DC=DCname,DC=AC,DC=IL)(primaryGroupID=18381))))(samaccountname=%uid)) |
| ldapLoginFilterAttributes |
| ldapLoginFilterEmail | 0
| ldapLoginFilterMode | 0
| ldapLoginFilterUsername | 1
| ldapNestedGroups | 0
| ldapOverrideMainServer |
| ldapPagingSize | 500
| ldapPort | 389
| ldapQuotaAttribute |
| ldapQuotaDefault |
| ldapTLS | 0
| ldapUserDisplayName | displayname
| ldapUserDisplayName2 |
| ldapUserFilter | (&(|(objectclass=person))(|(|(memberof=CN=Students,CN=Users,DC=ACADEMY,DC=DCname,DC=AC,DC=IL)(primaryGroupID=1003))(|(memberof=CN=Teachers,CN=Users,DC=ACADEMY,DC=DCname,DC=AC,DC=IL)(primaryGroupID=1005))(|(memberof=CN=Assistant,CN=Users,DC=ACADEMY,DC=DCname,DC=AC,DC=IL)(primaryGroupID=18381)))) |
| ldapUserFilterGroups | Students;Teachers;Assistant
| ldapUserFilterMode | 0
| ldapUserFilterObjectclass | person
| ldapUuidGroupAttribute | auto
| ldapUuidUserAttribute | auto
| turnOffCertCheck | 1
| turnOnPasswordChange | 0 | useMemberOfToDetectMembership | 1
Client configuration
**Browser: Chrome / Explorer **Operating system: Windows 10
Fatal webdav Icewind\SMB\Exception\Exception: Unknown error (16) for /shuvni/linuxmint-18.2-cinnamon-64bit.iso.ocTransferId1300754608.part
/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/Exception/Exception.php - line 35: Icewind\SMB\Exception\Exception
unknown('/shuvni/linuxmi...', 16)
/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/NativeState.php - line 46: Icewind\SMB\Exception\Exception fromMap(Array,
16, '/shuvni/linuxmi...')
/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/NativeState.php - line 58:
Icewind\SMB\NativeState->handleError('/shuvni/linuxmi...')
/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/NativeState.php - line 132: Icewind\SMB\NativeState->testResult(false, 'smb
//system3.a...')
/var/www/nextcloud/apps/files_external/3rdparty/icewind/smb/src/NativeShare.php - line 146: Icewind\SMB\NativeState->unlink('smb
//system3.a...')
/var/www/nextcloud/apps/files_external/lib/Lib/Storage/SMB.php - line 267: Icewind\SMB\NativeShare->del('/shuvni/linuxmi...')
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 261: OCA\Files_External\Lib\Storage\SMB->unlink('/shuvni/linuxmi...')
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 110:
OC\Files\Storage\Wrapper\Wrapper->unlink('linuxmint-18.2-...')
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 261:
OC\Files\Storage\Wrapper\PermissionsMask->unlink('linuxmint-18.2-...')
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/PermissionsMask.php - line 110:
OC\Files\Storage\Wrapper\Wrapper->unlink('linuxmint-18.2-...')
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 261:
OC\Files\Storage\Wrapper\PermissionsMask->unlink('linuxmint-18.2-...')
/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Availability.php - line 285:
OC\Files\Storage\Wrapper\Wrapper->unlink('linuxmint-18.2-...')
[internal function] OC\Files\Storage\Wrapper\Availability->unlink('linuxmint-18.2-...')
/var/www/nextcloud/apps/files_trashbin/lib/Storage.php - line 231: call_user_func_array(Array, Array)
/var/www/nextcloud/apps/files_trashbin/lib/Storage.php - line 163: OCA\Files_Trashbin\Storage->doDelete('linuxmint-18.2-...', 'unlink')
/var/www/nextcloud/apps/files_accesscontrol/lib/StorageWrapper.php - line 270: OCA\Files_Trashbin\Storage->unlink('linuxmint-18.2-...')
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 157: OCA\FilesAccessControl\StorageWrapper->unlink('linuxmint-18.2-...')
/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 151: OCA\DAV\Connector\Sabre\File->put(Resource id #61)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: OCA\DAV\Connector\Sabre\Directory->createFile('linuxmint-18.2-...',
Resource id #61)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile('Student/linuxmi...', Resource id #61,
NULL)
[internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
/var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request),
Object(Sabre\HTTP\Response))
/var/www/nextcloud/apps/dav/appinfo/v1/webdav.php - line 76: Sabre\DAV\Server->exec()
/var/www/nextcloud/remote.php - line 162: require_once('/var/www/nextcl...')
{main}
I've got the issue with an SFTP storage. Related to #1922
This issue has been automatically marked as stale because it has not had recent activity and it seems to be missing some essential informations. It will be closed if no further activity occurs. Thank you for your contributions.
As the version of the software you've reported this for has reached end of life, I will close this ticket. If this is still happening after an upgrade to the latest version, feel free to reopen