Repository navigation
Trash-bin will not delete files from external storage #14780
Description
Steps to reproduce
My config.php:
...
'trashbin_retention_obligation' => '7, auto',
'versions_retention_obligation' => '7, auto',
...
In regard to this comment in a #10862 I found a new bug:
- Added external storage, e.g. Local folder.
- Delete huge (few GB) files from it, e.g. Movie.
- Check trash bin in a web GUI - file was moved there from the external storage.
- Check trash bin in a web GUI when retention rules applied - file was deleted.
- Check your folder under ...data/user/files_trashbin/files/ and see that file was not deleted. e.g.
ls -la /var/www/nextcloud/data/user/files_trashbin/files
total 4194372
drwxr-x--- 2 www-data www-data 61440 Mar 16 22:30 .
drwxr-x--- 5 www-data www-data 4096 Jan 23 2018 ..
-rw-r--r-- 1 www-data www-data 4294967296 Jan 21 11:03 SOME.FILE.mkv.d1548064522
Expected behaviour
Trash bin in web GUI has the same content as in the hard drive. If file is not in the DB it should be deleted from the HDD, or added to DB by occ files:scan and then again being seen in GUI.
Actual behaviour
Trash bin deleted file from DB and from the GUI, but it is still on HDD. sudo -u www-data php occ files:scan USER does not help here.
Server configuration
Operating system: Ubuntu 16.04
Web server: Apache 2.4.38
Database: MariaDB 10.0.378
PHP version: 7.0.33
Nextcloud version: 15.0.5
Updated from an older Nextcloud/ownCloud or fresh install: Updated from older
Where did you install Nextcloud from: Official
Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.
No errors have been found.
List of activated apps:
Enabled:
- activity: 2.6.1
- bruteforcesettings: 1.1.0
- calendar: 1.6.1
- checksum: 0.4.0
- comments: 1.3.0
- data_request: 1.0.1
- dav: 1.4.7
- deck: 0.4.1
- federatedfilesharing: 1.3.1
- files: 1.8.0
- files_external: 1.4.1
- files_external_dropbox: 1.0.0
- files_pdfviewer: 1.2.1
- files_sharing: 1.5.0
- files_texteditor: 2.5.1
- files_trashbin: 1.3.0
- files_versions: 1.6.0
- files_videoplayer: 1.2.0
- firstrunwizard: 2.2.1
- flowupload: 0.0.7
- gallery: 18.0.0
- gpxpod: 2.2.2
- logreader: 2.0.0
- lookup_server_connector: 1.1.0
- mail: 0.8.3
- nextcloud_announcements: 1.2.0
- notes: 2.4.0
- notifications: 2.1.2
- oauth2: 1.1.1
- ocdownloader: 1.5.6
- password_policy: 1.3.0
- polls: 0.8.1
- previewgenerator: 1.1.0
- provisioning_api: 1.3.0
- radio: 0.6.1
- serverinfo: 1.3.0
- sharebymail: 1.3.0
- spreed: 3.2.5
- survey_client: 1.1.0
- theming: 1.4.5
- twofactor_backupcodes: 1.2.3
- twofactor_totp: 1.4.1
- unsplash: 1.1.1
- updatenotification: 1.3.0
- user_usage_report: 1.0.1
- weather: 1.5.1
- workflowengine: 1.3.0
Disabled:
- admin_audit
- contacts
- encryption
- external
- federation
- keeweb
- systemtags
- user_external
- user_ldap
Nextcloud configuration:
Config report
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"1",
"2",
"3"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"overwrite.cli.url": "https:\/\/1\/nextcloud",
"dbtype": "mysql",
"version": "13.0.5.2",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"filesystem_check_changes": 0,
"memcache.local": "\\OC\\Memcache\\APCu",
"mail_smtpmode": "sendmail",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"maintenance": false,
"theme": "",
"loglevel": 1,
"trashbin_retention_obligation": "7,auto",
"versions_retention_obligation": "7,auto",
"data-fingerprint": "7be51475e95ea13b254cd880319d98ec",
"enable_previews": true,
"enabledPreviewProviders": [
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\Movie",
"OC\\Preview\\PDF",
"OC\\Preview\\MP3",
"OC\\Preview\\TXT",
"OC\\Preview\\MarkDown"
],
"preview_max_x": 1080,
"preview_max_y": 1920,
"auth.bruteforce.protection.enabled": true
},
"apps": {
"activity": {
"enabled": "yes",
"installed_version": "2.6.1",
"notify_email_calendar": "0",
"notify_email_calendar_event": "0",
"notify_email_calendar_todo": "0",
"notify_email_comments": "0",
"notify_email_favorite": "0",
"notify_email_file_changed": "0",
"notify_email_file_created": "0",
"notify_email_file_deleted": "0",
"notify_email_file_restored": "0",
"notify_email_public_links": "0",
"notify_email_remote_share": "0",
"notify_email_shared": "0",
"notify_setting_batchtime": "3600",
"notify_setting_self": "1",
"notify_setting_selfemail": "0",
"notify_stream_calendar": "1",
"notify_stream_calendar_event": "1",
"notify_stream_calendar_todo": "1",
"notify_stream_comments": "1",
"notify_stream_favorite": "0",
"notify_stream_file_changed": "1",
"notify_stream_file_created": "1",
"notify_stream_file_deleted": "1",
"notify_stream_file_favorite": "0",
"notify_stream_file_restored": "1",
"notify_stream_public_links": "1",
"notify_stream_remote_share": "1",
"notify_stream_shared": "1",
"types": "filesystem"
},
"admin_audit": {
"enabled": "no",
"installed_version": "1.3.0",
"types": "logging"
},
"backgroundjob": {
"lastjob": "11"
},
"bruteForce": {
"whitelist_2": "192.168.0.1\/24"
},
"bruteforcesettings": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": ""
},
"calendar": {
"enabled": "yes",
"installed_version": "1.6.1",
"types": ""
},
"checksum": {
"enabled": "yes",
"installed_version": "0.4.0",
"types": "filesystem"
},
"comments": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "logging"
},
"contacts": {
"enabled": "no",
"installed_version": "2.1.5",
"types": ""
},
"core": {
"backgroundjobs_mode": "cron",
"installed.bundles": "[\"CoreBundle\"]",
"installedat": "1500300149.3827",
"lastcron": "1535281213",
"lastupdateResult": "[]",
"lastupdatedat": "1535240712",
"moveavatarsdone": "yes",
"oc.integritycheck.checker": "[]",
"previewsCleanedUp": "1",
"public_files": "files_sharing\/public.php",
"public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
"scss.variables": "91728caa5d548aeb0dc4f40750565c08",
"shareapi_default_expire_date": "yes",
"shareapi_expire_after_n_days": "30",
"umgmt_send_email": "false",
"umgmt_show_backend": "false",
"umgmt_show_email": "false",
"umgmt_show_last_login": "true",
"umgmt_show_storage_location": "false",
"updater.secret.created": "1532501168",
"vendor": "nextcloud"
},
"data_request": {
"enabled": "yes",
"installed_version": "1.0.1",
"types": ""
},
"dav": {
"buildCalendarSearchIndex": "yes",
"enabled": "yes",
"installed_version": "1.4.7",
"types": "filesystem"
},
"deck": {
"enabled": "yes",
"installed_version": "0.4.1",
"types": ""
},
"external": {
"enabled": "no",
"installed_version": "3.0.3",
"max_site": "4",
"sites": "{\"2\":{\"icon\":\"external.png\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"id\":2,\"name\":\"Cacti\",\"url\":\"https:\\\/\\\/1\\\/cacti_q1w2e3r4t5\\\/graph_view.php\"},\"3\":{\"icon\":\"external.png\",\"lang\":\"\",\"type\":\"link\",\"device\":\"\",\"id\":3,\"name\":\"Webmin\",\"url\":\"https:\\\/\\\/1:5000\"}}",
"types": ""
},
"federatedfilesharing": {
"enabled": "yes",
"installed_version": "1.3.1",
"types": ""
},
"federation": {
"enabled": "no",
"installed_version": "1.2.0",
"types": "authentication"
},
"files": {
"cronjob_scan_files": "500",
"default_quota": "10 GB",
"enabled": "yes",
"installed_version": "1.8.0",
"types": "filesystem"
},
"files_clipboard": {
"enabled": "no",
"installed_version": "0.7.1",
"types": ""
},
"files_external": {
"allow_user_mounting": "no",
"enabled": "yes",
"installed_version": "1.4.1",
"ocsid": "166048",
"types": "filesystem",
"user_mounting_backends": "ftp,dav,owncloud,sftp,amazons3,dropbox,googledrive,swift,files_external_dropbox,\\OC\\Files\\Storage\\SFTP_Key"
},
"files_external_dropbox": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": "filesystem"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "1.2.1",
"types": ""
},
"files_sharing": {
"enabled": "yes",
"installed_version": "1.5.0",
"types": "filesystem"
},
"files_texteditor": {
"enabled": "yes",
"installed_version": "2.5.1",
"types": ""
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "filesystem"
},
"files_versions": {
"enabled": "yes",
"installed_version": "1.6.0",
"types": "filesystem"
},
"files_videoplayer": {
"enabled": "yes",
"installed_version": "1.2.0",
"types": ""
},
"firstrunwizard": {
"enabled": "yes",
"installed_version": "2.2.1",
"types": "logging"
},
"flowupload": {
"enabled": "yes",
"installed_version": "0.0.7",
"types": ""
},
"gallery": {
"enabled": "yes",
"installed_version": "18.0.0",
"types": ""
},
"gpxpod": {
"enabled": "yes",
"installed_version": "2.2.2",
"types": ""
},
"keeweb": {
"enabled": "no",
"installed_version": "0.4.0",
"types": ""
},
"logreader": {
"enabled": "yes",
"installed_version": "2.0.0",
"levels": "01111",
"ocsid": "170871",
"relativedates": "1",
"types": ""
},
"lookup_server_connector": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": "authentication"
},
"mail": {
"enabled": "[\"family\"]",
"installed_version": "0.8.3",
"types": ""
},
"nextcloud_announcements": {
"enabled": "yes",
"installed_version": "1.2.0",
"pub_date": "Sat, 10 Dec 2016 00:00:00 +0100",
"types": "logging"
},
"notes": {
"enabled": "yes",
"installed_version": "2.4.0",
"ocsid": "174554",
"types": ""
},
"notifications": {
"enabled": "yes",
"installed_version": "2.1.2",
"types": "logging"
},
"oauth2": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": "authentication"
},
"ocdownloader": {
"enabled": "yes",
"installed_version": "1.5.6",
"types": ""
},
"password_policy": {
"enabled": "yes",
"enforceHaveIBeenPwned": "1",
"enforceUpperLowerCase": "0",
"installed_version": "1.3.0",
"minLength": "10",
"types": ""
},
"polls": {
"enabled": "yes",
"installed_version": "0.8.1",
"types": ""
},
"previewgenerator": {
"enabled": "yes",
"installed_version": "1.1.0",
"types": "filesystem"
},
"provisioning_api": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "prevent_group_restriction"
},
"radio": {
"enabled": "yes",
"installed_version": "0.6.1",
"types": ""
},
"richdocuments": {
"enabled": "no",
"installed_version": "1.12.39",
"types": "prevent_group_restriction"
},
"serverinfo": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": ""
},
"sharebymail": {
"enabled": "yes",
"installed_version": "1.3.0",
"sendpasswordmail": "no",
"types": "filesystem"
},
"sharepoint": {
"enabled": "no",
"installed_version": "1.0.2",
"types": "filesystem"
},
"spreed": {
"enabled": "yes",
"installed_version": "3.2.5",
"stun_servers": "[\"stun.nextcloud.com:443\"]",
"types": "prevent_group_restriction"
},
"survey_client": {
"enabled": "yes",
"encryption": "no",
"installed_version": "1.1.0",
"last_report": "{\"id\":\"ocejdr8m7tcu\",\"items\":[[\"server\",\"version\",\"13.0.5.2\"],[\"server\",\"code\",\"other\"],[\"server\",\"enable_avatars\",\"yes\"],[\"server\",\"enable_previews\",\"yes\"],[\"server\",\"memcache.local\",\"\\\\OC\\\\Memcache\\\\APCu\"],[\"server\",\"memcache.distributed\",\"none\"],[\"server\",\"asset-pipeline.enabled\",\"no\"],[\"server\",\"filelocking.enabled\",\"yes\"],[\"server\",\"memcache.locking\",\"none\"],[\"server\",\"debug\",\"no\"],[\"server\",\"cron\",\"cron\"],[\"php\",\"version\",\"7.0.30\"],[\"php\",\"memory_limit\",-1],[\"php\",\"max_execution_time\",0],[\"php\",\"upload_max_filesize\",2097152],[\"database\",\"type\",\"mysql\"],[\"database\",\"version\",\"5.7.23\"],[\"database\",\"size\",232161280],[\"apps\",\"activity\",\"2.6.1\"],[\"apps\",\"admin_audit\",\"1.3.0\"],[\"apps\",\"bruteforcesettings\",\"1.1.0\"],[\"apps\",\"calendar\",\"1.6.1\"],[\"apps\",\"checksum\",\"0.4.0\"],[\"apps\",\"comments\",\"1.3.0\"],[\"apps\",\"contacts\",\"disabled\"],[\"apps\",\"data_request\",\"1.0.1\"],[\"apps\",\"dav\",\"1.4.7\"],[\"apps\",\"deck\",\"0.4.1\"],[\"apps\",\"external\",\"disabled\"],[\"apps\",\"federatedfilesharing\",\"1.3.1\"],[\"apps\",\"federation\",\"disabled\"],[\"apps\",\"files\",\"1.8.0\"],[\"apps\",\"files_clipboard\",\"disabled\"],[\"apps\",\"files_external\",\"1.4.1\"],[\"apps\",\"files_external_dropbox\",\"1.0.0\"],[\"apps\",\"files_pdfviewer\",\"1.2.1\"],[\"apps\",\"files_sharing\",\"1.5.0\"],[\"apps\",\"files_texteditor\",\"2.5.1\"],[\"apps\",\"files_trashbin\",\"1.3.0\"],[\"apps\",\"files_versions\",\"1.6.0\"],[\"apps\",\"files_videoplayer\",\"1.2.0\"],[\"apps\",\"firstrunwizard\",\"2.2.1\"],[\"apps\",\"flowupload\",\"0.0.7\"],[\"apps\",\"gallery\",\"18.0.0\"],[\"apps\",\"gpxpod\",\"2.2.2\"],[\"apps\",\"keeweb\",\"disabled\"],[\"apps\",\"logreader\",\"2.0.0\"],[\"apps\",\"lookup_server_connector\",\"1.1.0\"],[\"apps\",\"mail\",\"0.8.3\"],[\"apps\",\"nextcloud_announcements\",\"1.2.0\"],[\"apps\",\"notes\",\"2.4.0\"],[\"apps\",\"notifications\",\"2.1.2\"],[\"apps\",\"oauth2\",\"1.1.1\"],[\"apps\",\"ocdownloader\",\"1.5.6\"],[\"apps\",\"password_policy\",\"1.3.0\"],[\"apps\",\"polls\",\"0.8.1\"],[\"apps\",\"previewgenerator\",\"1.1.0\"],[\"apps\",\"provisioning_api\",\"1.3.0\"],[\"apps\",\"radio\",\"0.6.1\"],[\"apps\",\"richdocuments\",\"disabled\"],[\"apps\",\"serverinfo\",\"1.3.0\"],[\"apps\",\"sharebymail\",\"1.3.0\"],[\"apps\",\"sharepoint\",\"disabled\"],[\"apps\",\"spreed\",\"3.2.5\"],[\"apps\",\"survey_client\",\"1.1.0\"],[\"apps\",\"systemtags\",\"disabled\"],[\"apps\",\"theming\",\"1.4.5\"],[\"apps\",\"twofactor_backupcodes\",\"1.2.3\"],[\"apps\",\"twofactor_totp\",\"1.4.1\"],[\"apps\",\"unsplash\",\"1.1.1\"],[\"apps\",\"updatenotification\",\"1.3.0\"],[\"apps\",\"user_usage_report\",\"1.0.1\"],[\"apps\",\"weather\",\"1.5.1\"],[\"apps\",\"workflowengine\",\"1.3.0\"],[\"stats\",\"num_files\",838513],[\"stats\",\"num_users\",7],[\"stats\",\"num_storages\",14],[\"stats\",\"num_storages_local\",2],[\"stats\",\"num_storages_home\",8],[\"stats\",\"num_storages_other\",4],[\"stats\",\"num_comments\",2],[\"stats\",\"num_comment_markers\",2],[\"stats\",\"num_systemtags\",0],[\"stats\",\"num_systemtags_mappings\",0],[\"files_sharing\",\"num_shares\",26],[\"files_sharing\",\"num_shares_user\",23],[\"files_sharing\",\"num_shares_groups\",0],[\"files_sharing\",\"num_shares_link\",3],[\"files_sharing\",\"num_shares_link_no_password\",3],[\"files_sharing\",\"num_fed_shares_sent\",0],[\"files_sharing\",\"num_fed_shares_received\",0],[\"files_sharing\",\"permissions_3_1\",\"2\"],[\"files_sharing\",\"permissions_3_4\",\"1\"],[\"files_sharing\",\"permissions_0_17\",\"1\"],[\"files_sharing\",\"permissions_0_19\",\"2\"],[\"files_sharing\",\"permissions_0_23\",\"3\"],[\"files_sharing\",\"permissions_0_29\",\"1\"],[\"files_sharing\",\"permissions_0_31\",\"16\"]]}",
"last_sent": "1534431619",
"types": ""
},
"systemtags": {
"enabled": "no",
"installed_version": "1.2.0",
"types": "logging"
},
"theming": {
"backgroundMime": "image\/jpeg",
"cachebuster": "18",
"enabled": "yes",
"imprintUrl": "https:\/\/1\/index.php\/s\/45A3Pq2tq2F8yJz",
"installed_version": "1.4.5",
"logoMime": "image\/png",
"name": "\u041e\u0431\u043b\u0430\u043a\u0430, \u0431\u0435\u043b\u043e\u0433\u0440\u0438\u0432\u044b\u0435 \u043b\u043e\u0448\u0430\u0440\u043a\u0438",
"slogan": "\u0422\u044b \u0442\u0430\u043c, \u0433\u0434\u0435 \u0442\u044b \u0435\u0441\u0442\u044c.",
"types": "logging",
"url": "https:\/\/1t"
},
"twofactor_backupcodes": {
"enabled": "yes",
"installed_version": "1.2.3",
"types": ""
},
"twofactor_totp": {
"enabled": "yes",
"installed_version": "1.4.1",
"types": ""
},
"unsplash": {
"enabled": "yes",
"installed_version": "1.1.1",
"types": "authentication"
},
"updatenotification": {
"bruteforcesettings": "1.1.0",
"calendar": "1.6.1",
"checksum": "0.4.0",
"core": "13.0.5.2",
"data_request": "1.0.1",
"deck": "0.4.1",
"enabled": "yes",
"external": "2.0.3",
"files_clipboard": "0.6.5",
"files_pdfviewer": "1.2.1",
"gpxpod": "2.2.2",
"installed_version": "1.3.0",
"keeweb": "0.4.0",
"mail": "0.8.1",
"notes": "2.4.0",
"ocdownloader": "1.5.6",
"polls": "0.8.1",
"previewgenerator": "1.1.0",
"radio": "0.6.1",
"spreed": "3.2.5",
"theming": "1.4.5",
"twofactor_totp": "1.3.1",
"types": "",
"unsplash": "1.1.1",
"update_check_errors": "0",
"user_usage_report": "1.0.1"
},
"user_usage_report": {
"enabled": "yes",
"installed_version": "1.0.1",
"types": "filesystem"
},
"weather": {
"enabled": "yes",
"installed_version": "1.5.1",
"openweathermap_api_key": "REPLACED",
"types": ""
},
"workflowengine": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "filesystem"
}
}
}
Are you using external storage, if yes which one: local, WebDav.
Are you using encryption: no
Activity
GAS85 commentedon Mar 21, 2019
Sorry, was wrong. Command helps:
sudo -u www-data php occ files:scan USERFile was removed and this what I can see in log:
{"reqId":"EBfGg4T05KQyfYUtssmO","level":1,"time":"2019-03-21T10:30:29+00:00","remoteAddr":"","user":"--","app":"files_trashbin","method":"","url":"--","message":"remove \"SOME.FILE.mkv\" (4294967296B) to meet the limit of trash bin size (50% of available quota)","userAgent":"--","version":"15.0.5.3"}Any way this is not the first time when I meet this issue and first time did removed files manually.
MorrisJobke commentedon Mar 25, 2019
Could you check if #13844 fixes the issue for you? This will be shipped in the upcoming version 15.0.6.
GAS85 commentedon Apr 8, 2019
Got this error by checking of my trash bin after update to NC 15.0.6:

After this nothing happens. I could not open trash bin from the WebUI... Android App also give an error.
kesselb commentedon Apr 8, 2019
@GAS85 #13160
stale commentedon Jun 7, 2019
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.
GAS85 commentedon Jun 11, 2019
Trash bin does not work at all... Still.
kesselb commentedon Jun 11, 2019
You tried #13160 (comment)?
GAS85 commentedon Jun 12, 2019
Yes it works, but it was again on "Defaults" since I did update of NC... Better, if it is finally part of delivery.
Regarding this issue, I can't check it, because GUI does not work and I tied to make changes manually between updates.
Files are on the HDD, and I have no Idea if they are still in the GUI or not.UPDATE: just applied correction from listed commend above and checked local folders, some files from external storage's again still on HDD, but not in the GUI/DB - still open.skjnldsv commentedon Jun 12, 2019
I'm not sure I get your last message.
Is it working now?
GAS85 commentedon Jun 13, 2019
Nope, it does not:
GAS85 commentedon Nov 25, 2019
Seems it works now in 16+. At least how it is described here all files, (also from externals) were deleted --> #10862 (comment)