Skip to content
Advertisement

ZipArchive::close(): Renaming temporary file failed: Permission denied

I have this strange error, when I try to delete a file inside a compressed directory :

JavaScript

Here is my code :

JavaScript

The echo executes successfully and prints File deleted. I am running a Mac and the permissions on the compressed directory is read & write for all users. What could be the issue?

Advertisement

Answer

As the error tells you, this is a permission problem. Make sure the apache user (www-data) has the write permission on the directory where the zip archive is.

After that, your code will work as expected.

Good luck !

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement