Project

General

Profile

Bug #7455

Improve error message when archive cleanup fails

Added by Torkil Zachariassen almost 5 years ago. Updated over 4 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
Administration
Target version:
Start date:
18/12/2014
Due date:
% Done:

100%

Estimated time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

When the cleanup of the archive fails, cf #7454, the error message is somewhat misleading.

On failure a message indicates that everything, except a .htaccess file, under archive/ should be removed. This seems to be incorrect as archive_cleanup.php calls rmdirr() with delete_only_content_in_folder set to TRUE. This only removes files and symbolic links. In particular the directories Serializer and twig as well as subsequent directories are preserved.

An improved error message is suggested below

Current error message in main/lang/english/admini.inc.php:
-$ArchiveDirCleanupFailed = "For some reason, the archive/ directory could not be cleaned up. Please clean it up by manually connecting to the server and deleting the contents of the chamilo/archive/ directory, except the .htaccess file.";

Suggested improvement in main/lang/english/admin.inc.php:
$ArchiveDirCleanupFailed = "For some reason, the archive/ directory could not be cleaned up. Please clean it up by manually connecting to the server and delete all files and symbolic links under the chamilo/archive/ directory, except the .htaccess file. On Linux: # find archive/ \( -type f -or -type l \) -not -name .htaccess -exec echo rm -v \{} \;";

Regards Torkil on Chamilo-1.9.8.2, CentOS-7.0.1406, httpd-2.4.6, php-5.4.16, mariadb-5.5.40, Linux 3.10.0-123.9.3.el7.x86_64


Related issues

Related to Chamilo LMS - Bug #7454: rmdirr() may fail and still return return true.Needs more info18/12/2014

Actions

Associated revisions

Revision 8cb2d42f (diff)
Added by Julio over 4 years ago

Using strict mode when cleaning files see #7455

History

#1

Updated by Julio Montoya over 4 years ago

  • Status changed from New to Needs more info
  • Target version set to 1.10.0

I added a fix here #7454 in function rmdirr(). The error message will be the variable "ArchiveDirCleanupFailed"
I'm not sure that it will be a good idea to put a command there, because it will depend on the system.

#3

Updated by Yannick Warnier over 4 years ago

  • Category set to Administration
  • Status changed from Needs more info to Needs testing
  • % Done changed from 0 to 90

I agree with Torkil here. If we say specifically that this is a Linux command, I don't think that's an issue. I hope translators will update their translations, though.

I updated the English variable as well as the French and Spanish ones.

If no objection, I will close this task in 5 days or a little more.

#4

Updated by Yannick Warnier over 4 years ago

  • Status changed from Needs testing to Bug resolved
  • Assignee set to Yannick Warnier
  • % Done changed from 90 to 100

Closing (no feedback)

Also available in: Atom PDF