This is a desperate call for help since the website is live and users are unable to upload pics. This is not a VirtualMin issue, but something related to folder permissions.
I just migrated my website from CentOS 7 to 8. Old & new server details are as follows
Operating system CentOS Linux 7.8.2003
Apache version 2.4.6
PHP versions 5.6.40, 7.0.27
MySQL version 5.5.65
Operating system CentOS Linux 8.2.2004
Apache version 2.4.37
PHP versions 7.2.24
MySQL version 10.3.17
I have a folder named “userpics” where i store photos uploaded by user. The userpics folder & files are owned by the user apache recursively. Folders have permission 0755 and files have permission 0644.
This used to work without issues in old server with CentOS 7 . But after migrating to CentOS 8, I am getting the following error while creating a directory.
PHP message: PHP Warning: mkdir(): Permission denied in /home/vserv/public_html/m.php on line 28\n’
sestatus command returns “SELinux status: disabled” in both the servers.
I tried setting
httpd_sys_rw_content_t for the folders, but it didn’t work.
I have spent 2 days to diagnose the issue. But nothing worked. Please help.
I ran echo exec(‘whoami’) in old and new server and found that the Old Server returns apache and new server returns the virtual server username. So, I think this has something to do with who runs PHP scripts. Is it PHP-FPM issue?