I am working on a website where I allow users to upload an image to a server. In order for file_put_contents()
to get the correct permissions, I had to change the user on the server to www-data
(the current user for the Apache server).
I am just wondering what possible security issues this may create, anyone with more experience able to give more in depth explanation or any alternatives that would be safer?