Joomla error: 0 Joomla\Filesystem\File::delete: Failed deleting inaccessible file

In joomla 3.9.x environment, updating an extensions could cause an error with the following error messages

Joomla error: 0 Joomla\Filesystem\File::delete: Failed deleting inaccessible file

This error is a hosting-related problem, occurs if the server allow to delete files/folders but doesn't allow to chmod those deleted files/folders.

The simply temporary solution to solve this error is,  edit libraries/vendor/joomla/filesystem/src/File.php
comment from line 123 to 127, then save it.

/*
if (!Path::canChmod($file))
{
throw new FilesystemException(__METHOD__ . ': Failed deleting inaccessible file ' . $filename);
}
*/

After this change, you should be able to update any extensions. Good luck.


Print   Email