[oC 6.0.5] Folder permanently deleted
Steps to reproduce
- Create a user with quota of 5 GB
- Sync a folder with 3 GB of data for the user
- Login in the web interface and delete the folder
- The folder will be permanently deleted instead of been moved to recycle bin
Question: Is there a way to increase % of recycle bin or disable the limit?
Expected behaviour
The folder should be moved to recycle bin
Actual behaviour
The folder is permanently deleted
Server configuration
Operating system: CentOS 6.5 64 bit
Web server: Apache 2.2.27
Database: MySQL 5.5.39
PHP version: 5.5.16
ownCloud version: 6.0.5
ownCloud client version: 1.6.2 build 3463
Updated from an older ownCloud or fresh install: fresh
List of activated apps: Activity, Deleted files, Pictures, Share Files, Versions, Video Viewer, Disable Remember Login
The content of config/config.php:
$CONFIG = array (
'instanceid' => '',
'passwordsalt' => '',
'trusted_domains' =>
array (
0 => '',
1 => '',
2 => '',
),
'datadirectory' => '/oc/data',
'dbtype' => 'mysql',
'version' => '6.0.5.1',
'dbname' => '',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => '',
'dbpassword' => '',
'installed' => true,
'loglevel' => '0',
'logdateformat' => 'd-m-Y - H:i:s',
'logtimezone' => 'America/Sao_Paulo',
'log_rotate_size' => 5242880,
'mail_smtpmode' => '',
'mail_smtphost' => '',
'mail_smtpauth' => true,
'mail_smtpname' => '',
'mail_smtppassword' => '',
'knowledgebaseenabled' => false,
'maintenance' => false,
'forcessl' => false,
'updatechecker' => false,
'default_language' => 'pt_BR',
'theme' => '',
'appstoreenabled' => false,
'memcached_servers' =>
array (
0 =>
array (
0 => 'localhost',
1 => ,
),
),
);
Are you using external storage, if yes which one: no (dedicated hdd for data directory)
Are you using encryption: no
Client configuration
Browser: Chrome 37
Operating system: Windows 8.1 PRO 64 bit
Logs
Web server error log
No relevant log to show
ownCloud log (data/owncloud.log)
{"app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-108038ei8WHVwhLpf%d\" \"-f\/tmp\/magick-108031eNKHiOwkIRv\" \"-f\/tmp\/magick-10803d4xDwsJrsNjM\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"2014-08-29T13:01:42+00:00"}
{"reqId":"54007a4929e98","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:04:09","method":"GET","url":"\/index.php"}
{"reqId":"54007a4ea373c","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:04:14","method":"GET","url":"\/index.php\/apps\/files"}
{"reqId":"54007a525ee49","app":"core","message":"Generating preview for \"\/music\/projekteva-letitrain.mp3\" with \"OC\\Preview\\MP3\"","level":0,"time":"29-08-2014 - 10:04:18","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fmusic%2Fprojekteva-letitrain.mp3&c=540079b6daef1"}
{"reqId":"54007a525ee49","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"29-08-2014 - 10:04:18","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fmusic%2Fprojekteva-letitrain.mp3&c=540079b6daef1"}
{"reqId":"54007a53901cd","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:04:19","method":"GET","url":"\/index.php"}
{"reqId":"54007ac81a60f","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:06:16","method":"GET","url":"\/index.php"}
{"reqId":"54007acecab28","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:06:22","method":"GET","url":"\/index.php"}
{"reqId":"54007ad261561","app":"core","message":"Generating preview for \"\/photos\/squirrel.jpg\" with \"OC\\Preview\\Image\"","level":0,"time":"29-08-2014 - 10:06:26","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fphotos%2Fsquirrel.jpg&c=540079b6d8953"}
{"reqId":"54007ad261561","app":"core","message":"OC_Image->fixOrientation() Orientation: 1","level":0,"time":"29-08-2014 - 10:06:26","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fphotos%2Fsquirrel.jpg&c=540079b6d8953"}
{"reqId":"54007ad27545a","app":"core","message":"Generating preview for \"\/photos\/san francisco.jpg\" with \"OC\\Preview\\Image\"","level":0,"time":"29-08-2014 - 10:06:26","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fphotos%2Fsan+francisco.jpg&c=540079b6d83ca"}
{"reqId":"54007ad27545a","app":"core","message":"OC_Image->fixOrientation() Orientation: 1","level":0,"time":"29-08-2014 - 10:06:26","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fphotos%2Fsan+francisco.jpg&c=540079b6d83ca"}
{"reqId":"54007ad288eac","app":"core","message":"Generating preview for \"\/photos\/paris.jpg\" with \"OC\\Preview\\Image\"","level":0,"time":"29-08-2014 - 10:06:26","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fphotos%2Fparis.jpg&c=540079b6d7cab"}
{"reqId":"54007ad288eac","app":"core","message":"OC_Image->fixOrientation() Orientation: 1","level":0,"time":"29-08-2014 - 10:06:26","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2Fphotos%2Fparis.jpg&c=540079b6d7cab"}
{"reqId":"54007ad3ab740","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:06:27","method":"GET","url":"\/index.php"}
{"reqId":"54007b21db1d2","app":"index","message":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: Route \"contacts_index\" does not exist.","level":4,"time":"29-08-2014 - 10:07:45","method":"GET","url":"\/index.php\/settings\/ajax\/navigationdetect.php?app=contacts"}
{"reqId":"54007b52cbabb","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:08:34","method":"GET","url":"\/index.php"}
{"reqId":"54007bb6235e6","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_trashbin\/files' is not readable !!!","level":0,"time":"29-08-2014 - 10:10:14","method":"GET","url":"\/index.php"}
{"reqId":"54007bc28038a","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_versions' is not readable !!!","level":0,"time":"29-08-2014 - 10:10:26","method":"POST","url":"\/index.php\/apps\/files\/ajax\/delete.php"}
{"reqId":"54007bc28038a","app":"OC\\Files\\Cache\\Scanner","message":"!!! Path 'files_versions' is not readable !!!","level":0,"time":"29-08-2014 - 10:10:26","method":"POST","url":"\/index.php\/apps\/files\/ajax\/delete.php"}
{"reqId":"54007bc5b93a1","app":"core","message":"Generating preview for \"ownCloudUserManual.pdf.d1409317826\" with \"OC\\Preview\\PDF\"","level":0,"time":"29-08-2014 - 10:10:29","method":"GET","url":"\/index.php\/apps\/files_trashbin\/preview.png?x=36&y=36&file=ownCloudUserManual.pdf.d1409317826"}
{"reqId":"54007bc5b93a1","app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-10912C6DWshsuc9TZ%d\" \"-f\/tmp\/magick-10912RxXCon6AF4VJ\" \"-f\/tmp\/magick-10912pohNmSi5m4Xt\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"29-08-2014 - 10:10:29","method":"GET","url":"\/index.php\/apps\/files_trashbin\/preview.png?x=36&y=36&file=ownCloudUserManual.pdf.d1409317826"}
{"reqId":"54007bc5b93a1","app":"core","message":"Generating preview for \"ownCloudUserManual.pdf.d1409317826\" with \"OC\\Preview\\Unknown\"","level":0,"time":"29-08-2014 - 10:10:29","method":"GET","url":"\/index.php\/apps\/files_trashbin\/preview.png?x=36&y=36&file=ownCloudUserManual.pdf.d1409317826"}
{"reqId":"54007bc5b93a1","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"29-08-2014 - 10:10:29","method":"GET","url":"\/index.php\/apps\/files_trashbin\/preview.png?x=36&y=36&file=ownCloudUserManual.pdf.d1409317826"}
{"reqId":"54007bc5b93a1","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"29-08-2014 - 10:10:29","method":"GET","url":"\/index.php\/apps\/files_trashbin\/preview.png?x=36&y=36&file=ownCloudUserManual.pdf.d1409317826"}
{"reqId":"54007bce8ed26","app":"OC\\Files\\Cache\\Scanner","message":"!!! No reuse of etag for 'files_trashbin\/files' !!! \ncache: Array\n(\n [fileid] => 16\n [storage] => home::Christiansen.NORONHA\n [path] => files_trashbin\/files\n [parent] => 15\n [name] => files\n [mimetype] => httpd\/unix-directory\n [mimepart] => httpd\n [size] => 1573669\n [mtime] => 1409317826\n [storage_mtime] => 1409317826\n [encrypted] => \n [unencrypted_size] => 0\n [etag] => 54007bc292dea\n)\n \ndata: Array\n(\n [mimetype] => httpd\/unix-directory\n [mtime] => 1409317836\n [size] => -1\n [etag] => 54007bce8e98b\n [storage_mtime] => 1409317836\n [parent] => 15\n)\n","level":0,"time":"29-08-2014 - 10:10:38","method":"GET","url":"\/index.php\/apps\/files"}
{"reqId":"54007bcfe4b74","app":"core","message":"Generating preview for \"\/\/ownCloudUserManual.pdf\" with \"OC\\Preview\\PDF\"","level":0,"time":"29-08-2014 - 10:10:39","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2F%2FownCloudUserManual.pdf&c=54007bccb7548"}
{"reqId":"54007bcfe4b74","app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-10913P7RAoinQuPSa%d\" \"-f\/tmp\/magick-10913X7vNx7shhbNy\" \"-f\/tmp\/magick-10913_5e9dl9ncCHW\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"29-08-2014 - 10:10:39","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2F%2FownCloudUserManual.pdf&c=54007bccb7548"}
{"reqId":"54007bcfe4b74","app":"core","message":"Generating preview for \"\/\/ownCloudUserManual.pdf\" with \"OC\\Preview\\Unknown\"","level":0,"time":"29-08-2014 - 10:10:39","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2F%2FownCloudUserManual.pdf&c=54007bccb7548"}
{"reqId":"54007bcfe4b74","app":"core","message":"OC_Image->fixOrientation() No readable file path set.","level":0,"time":"29-08-2014 - 10:10:40","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2F%2FownCloudUserManual.pdf&c=54007bccb7548"}
{"reqId":"54007bcfe4b74","app":"core","message":"OC_Image->fixOrientation() Orientation: -1","level":0,"time":"29-08-2014 - 10:10:40","method":"GET","url":"\/index.php\/core\/preview.png?x=36&y=36&file=%2F%2FownCloudUserManual.pdf&c=54007bccb7548"}
{"app":"core","message":"NoDecodeDelegateForThisImageFormat `PDF' @ error\/constitute.c\/ReadImage\/501","level":3,"time":"29-08-2014 - 10:44:15"}
{"app":"core","message":"NoDecodeDelegateForThisImageFormat `PDF' @ error\/constitute.c\/ReadImage\/501","level":3,"time":"29-08-2014 - 10:44:27"}
{"app":"core","message":"NoDecodeDelegateForThisImageFormat `PDF' @ error\/constitute.c\/ReadImage\/501","level":3,"time":"29-08-2014 - 10:44:38"}
{"app":"core","message":"NoDecodeDelegateForThisImageFormat `PDF' @ error\/constitute.c\/ReadImage\/501","level":3,"time":"29-08-2014 - 10:46:23"}
{"app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-10802TCDMnsQtcw0l%d\" \"-f\/tmp\/magick-10802OYo-ycyVond0\" \"-f\/tmp\/magick-10802MYLsAqML4jqE\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"29-08-2014 - 10:50:23"}
{"app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-10802HKY08GmLYfd4%d\" \"-f\/tmp\/magick-10802ngSwPm6XIkY4\" \"-f\/tmp\/magick-10802Sx95_OUIjqJ5\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"29-08-2014 - 10:50:41"}
{"app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-10798IikAcoWfHzgG%d\" \"-f\/tmp\/magick-10798hl6ALQwL4yto\" \"-f\/tmp\/magick-10798wQyWH7EYqzG6\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"29-08-2014 - 10:50:50"}
{"app":"PHP","message":"Undefined index: directory at \/var\/www\/html\/owncloud\/apps\/files\/lib\/helper.php#24","level":3,"time":"29-08-2014 - 12:45:50"}
{"app":"PHP","message":"Undefined index: directory at \/var\/www\/html\/owncloud\/apps\/files\/lib\/helper.php#24","level":3,"time":"29-08-2014 - 12:45:55"}
{"app":"core","message":"PDFDelegateFailed `[ghostscript library] -q -dQUIET -dSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=2 \"-sDEVICE=pngalpha\" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 \"-r72x72\" -dFirstPage=1 -dLastPage=1 \"-sOutputFile=\/tmp\/magick-10801V4y7AZL4ioEw%d\" \"-f\/tmp\/magick-10801rucv766Ltgwm\" \"-f\/tmp\/magick-108015p0_mwbBydoc\"': -dname= must be followed by a valid token\n @ error\/pdf.c\/InvokePDFDelegate\/256","level":3,"time":"29-08-2014 - 12:47:58"}
{"app":"PHP","message":"Undefined index: directory at \/var\/www\/html\/owncloud\/apps\/files\/lib\/helper.php#24","level":3,"time":"29-08-2014 - 13:23:49"}
{"app":"PHP","message":"Undefined index: directory at \/var\/www\/html\/owncloud\/apps\/files\/lib\/helper.php#24","level":3,"time":"29-08-2014 - 13:29:22"}
{"app":"PHP","message":"Undefined index: directory at \/var\/www\/html\/owncloud\/apps\/files\/lib\/helper.php#24","level":3,"time":"29-08-2014 - 13:34:54"}
{"app":"files_trashbin","message":"remove \"PRO\" (2339522298B) to meet the limit of trash bin size (50% of available quota)","level":1,"time":"29-08-2014 - 13:37:58"}
Browser log
No relevant log to show
@schiesbn any idea?
I think @schiesbn and I already discussed such cases. If I remember well, there might be a fix for such situations in OC 7 but I'm not 100% sure.
@christianrj I see from your linked report that you already tried OC 7.0.2, does this issue mentionned here still happen ?
@PVince81 I don't know, because we are not using oC 7 anymore. Too many bugs and problems with this version, it's not ready for production use.
I only verified this with oC 6. Thanks!
@PVince81 @karlitschek @schiesbn
Another problem I found (oC 6.0.5):
1 - Created an account with 20 GB quota 2 - Synced two folders: one with 6.9 GB and another with 3.5 GB 3 - Deleted the 6.9 GB folder. It was INSTANTLY DELETED, without been moved to trash 4 - Deleted the 3.5 GB folder. Again, instantly deleted. No traces in trash
All of this was done via web interface.
Hmmmm 6.9 + 3.5 = 10.4 GB which is more than half of the quota. I believe that the trashbin isn't allowed to contain more than 50% of the existing quota/free space, so it would first delete old files that were inside the trashbin, and then if the new files don't fit, delete them as well.
Question is: did these folders contain big files (one 6.9 GB file) or a lot of smaller files ? For smaller files I'd expect at least a few of them to be moved to the trashbin as they should fit.
@PVince81 No, file sizes are diverse. Both folders are deleted instantly. I think the behavior of trash should be configurable
christianrj's initial example seems to be no bug: 5 gb total, 3 gb content, 2 gb left, 50 % of 2 gb = 1 gb for trash bin, so one should not wonder that 3 gb do not fit (if you trash them as a whole). BUT the "second" example (September 6) shows a problem I've also encountered: 20 gb total, 6.9 + 3.5 = 10.4 gb content, 9.6 gb left, 50% of that = 4.8 gb -- OK, you would expect direct deletion if you delete the 10.4 gb as a whole, but (as stated) after deleting 6.9 gb first there are 16.5 gb free = 8.25 gb for a trash bin, so why are 3.5 gb (which should even fit in the former 4.8 gb) too big to be not deleted directly? Are there trash bin zombies intermingled when counting space? or does ownCloud forget to reset some threshold variable? I was not able to store a 135 kb file in a totally empty trash bin when 3.6 gb from 10 gb were still free - unfortunately, I have no time at the moment for further inspections and chose a brute force solution by increasing the account's quota from 10 to 50 gb, this seems to let ownCloud recalculate available trash bin space ...
From what I remember there was a threshold reset issue like @hh-lohmann, but this should be fixed already in OC 6.0.5 by https://github.com/owncloud/core/pull/9618
You could check the database table oc_files_trashsize to see whether it changes after deleting files (in case another similar bug sneaked in)
The only real fix for me is to disable quota, configuring everything to unlimited space, so everything that is deleted REALLY goes to trashbin as intended and as it should be.
Where I can modify the code to remove this limitation of 50% space for trashbin, so I can enable quotas again for our users?
@christianrj you could try playing with this value: https://github.com/owncloud/core/blob/master/apps/files_trashbin/lib/trashbin.php#L31
@PVince81 Thanks! What I did for now was to set unlimited space for everyone.
Closing due to https://github.com/owncloud/core/blob/4d69e562a065a79461343444a842ada025f3643c/config/config.sample.php#L376-L446
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.