rachelgomez161999
posted this
09 January 2023
This occurs when Joomla! fails to copy a file / folder from the tmp folder to it's destination. It is, most likely, generated by the fact that there are not enough write permissions set up for the destination folder. To fix this, simply make sure that there are enough permissions set for the destination folder.
An error has occured -1 copy file failed
In Joomla! 3.x:
edit the libraries/src/Filesystem/Folder.php file
look for the following code (around lines 155-159):
if (!@copy($sfid, $dfid))
{
throw new \RuntimeException('Copy file failed', -1);
}
and replace it with this one:
if (!@copy($sfid, $dfid))
{
throw new \RuntimeException('Copy file failed '.$sfid.' => '.$dfid, -1);
}
The code above will improve how the error message is displayed by adding the source and destination folders to it. This way, you will be able to know exactly which folders do not have enough permissions set.
Regards,
Rachel Gomez
This occurs when Joomla! fails to copy a file / folder from the tmp folder to it's destination. It is, most likely, generated by the fact that there are not enough write permissions set up for the destination folder. To fix this, simply make sure that there are enough permissions set for the destination folder.
An error has occured -1 copy file failed
In Joomla! 3.x:
edit the libraries/src/Filesystem/Folder.php file
look for the following code (around lines 155-159):
if (!@copy($sfid, $dfid))
{
throw new \RuntimeException('Copy file failed', -1);
}
and replace it with this one:
if (!@copy($sfid, $dfid))
{
throw new \RuntimeException('Copy file failed '.$sfid.' => '.$dfid, -1);
}
The code above will improve how the error message is displayed by adding the source and destination folders to it. This way, you will be able to know exactly which folders do not have enough permissions set.
Regards,
Rachel Gomez