I have just moved my php website to a new server and am having the following problems.
The website is meant to create files in a particular folder. The files are created with an owner:group as apache:apache
The only way I can get the website to correctly create the files is if I change the permissions on the folder they are created in to 777. I tried changing the folder owner:group to apache:apache so I could put the permissions back down to 755 but this didn't work.
Secondly, I can only view the files when I manually change the owner away from apache:apache . If I keep the owner:group of the files as apache:apache and set permissions to 777, they won't display.
So I need some help/advice on keeping up my security, but also allowing files to be created and read properly.