Error message “Cannot write file [path to file]” means that access permissions of the specified file, or also its parent directory, are not sufficient for a PHP script to rewrite its contents.
To fix this error, do one of the following:
- Check whether there is enough free disk space to save new files.
- Increase permission values for the file and its parent directory (use the file manager in your web-hosting control panel or an SSH/FTP connection).
- Change access rights for web server‘s operating system users (for experienced users with expertise in correct changing of the server operating system configuration).