# Writing To External In PHP Custom Script Service

**URL:** <https://community.dreamfactory.com/t/writing-to-external-in-php-custom-script-service/4039>\
**Category:** Server-Side Scripting\
**Created:** [September 7, 2017, 2:15pm UTC](https://community.dreamfactory.com/t/writing-to-external-in-php-custom-script-service/4039 "2017-09-07T14:15:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larry\_Parker](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@Larry\_Parker](https://community.dreamfactory.com/u/Larry_Parker)\
**Post date:** [September 7, 2017, 2:15pm UTC](https://community.dreamfactory.com/t/writing-to-external-in-php-custom-script-service/4039/1 "2017-09-07T14:15:54Z")

</div>

Hi everyone.

I am trying to write data to file that is outside the dreamfactory dreamfactory/storage and this doesn’t seem to work. Are there particular permissions I need to give dreamfactory. Current the install was done using root.

---

<div class="post-metadata">

**Author:** ![mattschaer](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.dreamfactory.com/mattschaer/32/914_2.png) [@mattschaer](https://community.dreamfactory.com/u/mattschaer)\
**Post date:** [September 12, 2017, 7:49pm UTC](https://community.dreamfactory.com/t/writing-to-external-in-php-custom-script-service/4039/2 "2017-09-12T19:49:59Z")

</div>

@Larry_Parker when [installing DF](https://wiki.dreamfactory.com/DreamFactory/APT/Ubuntu_16.04/Installation) we advise the user to set the permission on the storage and cache directories as follows:  
`$ sudo chown -R www-data:dfuser storage/ bootstrap/cache/`  
`$ sudo chmod -R 2775 storage/ bootstrap/cache/`  
I would check that any directory you are writing to has the proper permissions 🍻
