Hopefully someone can help me out, my site isn`t working ATM due to an issue.
I changed the apache MPM and for that I needed to change virtualmin to have it run as virtualserver owner (was the only option left). I did that, and now the virtual server runs as virtual server owner.
So I did whoami check in PHP and saw the user which was the virtualserver owner. Unfortunately, the webshop did not work, I couldn`t login and sessions where not stored.
So I thought, must be permissions. Server runs as UserX but permissions where still www-data. So I changed all files and folder permissions to chown UserX. Then I changed apache run user and I changed suexec UserGroup.
Restart apache and it seemed to work, but just for a couple of minutes. After that, session where not stored anymore.
So here is where the strange behaviour started happening. I have chowned a dir to 777 and user + group UserX. Then I SFTP with UserX as user and I try uploading a file, does not work. It does upload, but the file is empty. Then I checked error log, session folder, etc. Everything empty files.
What`s happening? Why are empty files created? Where did I go wrong in the above steps?
I'm eager to learn more and obviously I`m missing something (or a couple of things). Hopefully someone can explain a couple of things to me.
Thanks a lot!