I've got a PHP script that creates a folder on my server. This folder is supposed to be accessed via Apache, and users can view it online.
Now if I create this folder while being root, everything works as it should, I can view the html/php when going on the website.
If I create this folder while being the user Apache (or running my script), I can create the folder, put all the files inside but when I got on my webpage, it displays:
You don't have permission to access / on this server.
Now I don't know that much about Apache, but for me the easiest solution is to give ownership of my folder to root. I try typing:
chown root:root /blabla/myfolder
and it writes:
chown: changing ownership of 'myfolder/': Operation not permitted
Why is that ?