Support Forums - Classified Ads Script Osclass
General osclass questions => Report bug => Topic started by: Mindaugas on April 13, 2023, 10:31:04 AM
-
Impossible create backup of files witch dashboard tools for backup. Tool show message "Archived successfully!", but archive not created and debug get next error:
[13-Apr-2023 10:33:22 Europe/Vilnius] PHP Warning: ZipArchive::close(): Can't open file: Permission denied in /var/www/html/domain.xx/oc-includes/osclass/utils.php on line 1413
Apache error log file:
[Thu Apr 13 10:33:22.799339 2023] [php7:warn] [pid 77931] [client 87.247.90.129:48552] PHP Warning: ZipArchive::close(): Can't open file: Permission denied in /var/www/html/domain.xx/oc-includes/osclass/utils.php on line 1413, referer: https://www.domain.xx/oc-admin/index.php?page=tools&action=backup
Directory permision is 755
File perminsion is 644
Owner www-data:www-data
Osclass version: 8.1.1
PHP version: 7.4.3
What could be wrong?
-
Maybe you do not have correct permissions in root folder that does not allow create archive here?
That would be first what I would check
-
Permissions of root dir (/var/www/html/<domain>) is:
Access: (0755/drwxr-xr-x) Uid: ( 33/www-data) Gid: ( 33/www-data)
It seems to me that permissions of root dir are good.
Where else could there be a mistake?
-
Try to set 0755 chmod for all folders and subfolders.
-
nothing helps, I tried to make permissions 777 for all, 755 for dir and 644 for file, same error :(
-
Last what comes to my mind is to test ZIP function manually on your site, that you create small script and try to run it, if it can zip.
-
The compression function in the terminal works, php-zip is installed. The reason remains unclear, but it seems to be related to OS and PHP. The situation was resolved when the migrated from VPS to hosting.
-
Interesting, there could be relation between chmod - zip - php, but some of these settings are even hidden and usually just hostiing can help to resolve.