# Writable directories

**URL:** <https://meta.discourse.org/t/writable-directories/71787>\
**Category:** Self-hosting\
**Tags:** unsupported-install\
**Created:** [October 10, 2017, 9:01pm UTC](https://meta.discourse.org/t/writable-directories/71787 "2017-10-10T21:01:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tdutrion](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdutrion/32/120642_2.png) [@tdutrion](https://meta.discourse.org/u/tdutrion)\
**Post date:** [October 10, 2017, 9:01pm UTC](https://meta.discourse.org/t/writable-directories/71787/1 "2017-10-10T21:01:38Z")

</div>

Hi!

I know this use case is not supported, but even though I am currently trying to install on platform.sh, I am running into a read-only filesystem exception (trying to create a folder apparently).

```plaintext
E, [2017-10-10T20:50:57.085606 #1442] ERROR -- : Read-only file system @ dir_s_mkdir - tmp (Errno::EROFS)
/opt/ruby/2.4/lib/ruby/2.4.0/fileutils.rb:229:in `mkdir'
/opt/ruby/2.4/lib/ruby/2.4.0/fileutils.rb:229:in `fu_mkdir'
/opt/ruby/2.4/lib/ruby/2.4.0/fileutils.rb:207:in `block (2 levels) in mkdir_p'
/opt/ruby/2.4/lib/ruby/2.4.0/fileutils.rb:205:in `reverse_each'
/opt/ruby/2.4/lib/ruby/2.4.0/fileutils.rb:205:in `block in mkdir_p'
/opt/ruby/2.4/lib/ruby/2.4.0/fileutils.rb:191:in `each'
/opt/ruby/2.4/lib/ruby/2.4.0/fileutils.rb:191:in `mkdir_p'

```

I don’t really know Ruby and have no clue how to debug. Platform.sh indeed has a read-only filesystem (for security purpose), and I have to declare any writable folder as mount point. Unfortunately I couldn’t find a list of writable folders…

Here’s what I could retrieve from different implementations (docker, ansible and so on):

- ${my\_app}/log
- ${my\_app}/tmp
- ${my\_app}/app/log
- ${my\_app}/app/tmp
- ${my\_app}/app/app/public/uploads
- ${my\_app}/app/app/tmp

Not sure about these, or about other I could have missed, still doesn’t work though ☹  
If you can help me please do!

---

<div class="post-metadata">

**Author:** ![tdutrion](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tdutrion/32/120642_2.png) [@tdutrion](https://meta.discourse.org/u/tdutrion)\
**Post date:** [October 10, 2017, 10:50pm UTC](https://meta.discourse.org/t/writable-directories/71787/2 "2017-10-10T22:50:02Z")

</div>

I changed my mount point for the following:

- ${my\_app}/tmp
- ${my\_app}/log
- ${my\_app}/public/plugins

And it seems to be fine.

Currently struggling with the database configuration (from a json string provided by platform.sh), but once this is done and a basic installation works I’ll update the post with more details (uploads folder, specific plugins installed and no override when redeploying…).

---

<div class="post-metadata">

**Author:** ![Ori\_Pekelman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ori_pekelman/32/124402_2.png) [@Ori\_Pekelman](https://meta.discourse.org/u/Ori_Pekelman)\
**Post date:** [October 12, 2017, 12:29am UTC](https://meta.discourse.org/t/writable-directories/71787/3 "2017-10-12T00:29:11Z")

</div>

Discourse seems to be doing something a bit evil. It has publc/images under git _and_ it wants it writable… I’ll try to track this down and open a PR.

Other than that discourse seems not to have its configuration in the default rails way (in config/database.yml) but in config/discourse.config (If I understand correctly). So it seems you would want to override it there.

The last thing is a Platform.sh specific thing. “normal environment” variables need to be prefixed by `env:` so rather than doing `platform variable:set RAILS_ENV production` you needed `platform variable:set env:RAILS_ENV production`
