title: Apache/CentOS 7: /var/www/html/ owned by root but created files owned by apache - how do I resolve this?
body: <p>I have a fresh, unmodified install of Apache on CentOS 7. I notice that when I look at the folder permissions for /var/www/html it and it's content is owned by apache. When a file is created, however, its owner and group is Apache.</p>
  
  <p>Though html is owned by root:root, should all of the contents be owned by apache:apache? or [user]:apache with that user belonging to the Apache group? How should I go about this?</p>
  
  <p><strong>Edit:</strong>
  Another question - do I <em>want</em> to change this? I do not have a very good understanding of file ownership in Linux systems but it seems with this configuration that the newly created files (apache:apache) are prevented from taking action against files that already exist (root:root). This <em>should</em> prevent PHP hacks from being able to manipulate any existing files, right? Is this just the illusion of security though?</p>