# Write to ./etc/

**URL:** <https://forum.kirupa.com/t/write-to-etc/295274>\
**Category:** Uncategorized\
**Created:** [August 27, 2009, 2:34pm UTC](https://forum.kirupa.com/t/write-to-etc/295274 "2009-08-27T14:34:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![forza\_stiinta](https://avatars.discourse-cdn.com/v4/letter/f/bc79bd/32.png) [@forza\_stiinta](https://forum.kirupa.com/u/forza_stiinta)\
**Post date:** [August 27, 2009, 2:34pm UTC](https://forum.kirupa.com/t/write-to-etc/295274/1 "2009-08-27T14:34:34Z")

</div>

I am trying to use a php script to write to a file in the ./etc/test/ directory, and though that file was 777 permissions i get

```auto
 Permission denied in **/var/www/html/config/index.php** on line **18**
can't open file

```

when i try to open with fopen and “w” as a paramater. with fopen and “r” it reads the content fine.
