# Apache as owner of httpdocs

**URL:** <https://forum.kirupa.com/t/apache-as-owner-of-httpdocs/261857>\
**Category:** programming\
**Created:** [May 31, 2008, 9:44pm UTC](https://forum.kirupa.com/t/apache-as-owner-of-httpdocs/261857 "2008-05-31T21:44:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [May 31, 2008, 9:44pm UTC](https://forum.kirupa.com/t/apache-as-owner-of-httpdocs/261857/1 "2008-05-31T21:44:46Z")

</div>

Is this a really bad idea? With safe\_mode on and safe\_mode\_gid off I can’t get around having php scripts being able to write with fopen (with SElinux[fedora core])) …

Been thinking about it and I’m sure it’s not great, but I can’t think of why it would be catastrophical either…

thoughts?

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 1, 2008, 9:09pm UTC](https://forum.kirupa.com/t/apache-as-owner-of-httpdocs/261857/2 "2008-06-01T21:09:27Z")

</div>

More of a FYI than anything else but I had this itching at the back of my neck giving the web daemon ownership of my wwwroot so I re-wrote all the scripts to point to a secondary directory (wwwroot/something) and gave apache ownership of that folder instead… so if someone hacks it, it ain’t the end of the world 😉

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 2, 2008, 3:17pm UTC](https://forum.kirupa.com/t/apache-as-owner-of-httpdocs/261857/3 "2008-06-02T15:17:30Z")

</div>

What are you talking about?

I’m giving a php script the rights to write a .xls and .xml file to the server. Where did you get read source of php from 🙂

---

<div class="post-metadata">

**Author:** ![sekasi](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@sekasi](https://forum.kirupa.com/u/sekasi)\
**Post date:** [June 2, 2008, 6:27pm UTC](https://forum.kirupa.com/t/apache-as-owner-of-httpdocs/261857/4 "2008-06-02T18:27:22Z")

</div>

I’m sorry but I guess you’re not reading my post… my question was if giving Apache ownership of wwwroot is a bad idea.
