File 'containers/app.yml' is unwritable

I am following this guide to install discourse on AWS EC2 instance.

Completed all the steps except Elasticache (not using separate Redis).

After finishing the discourse setup, I need to edit my app.yml for change in RDS and SMTP settings.

But it’s showing that File ‘containers/app.yml’ is unwritable.

Has anyone faced this issue? How to resolve this?

Have you checked the owner of the app.yml file?

1 Like

No, How to find out this?

from your command line, cd to the containers folder and type ls -l

1 Like

Sorry I don’t know much about Unix commands. Can you give me full command that I should enter to find out the owner of the app.yml file?

cd /var/discourse/containers && ls -l


run whoami

1 Like

Showing this : -rw-r–r-- 1 root root 3819 Jul 30 10:21 app.yml

1 Like

run whoami
It’s : ubuntu

There you go. You aren’t logged in as root. And the file belongs to the root user. That’s why you aren’t able to write to that file.

Actually, with EC2, you cannot login as root directly. Now, you’re logged in as ubuntu user.

type in sudo su -


Okay. Actually initially I followed the commands given here.

Just tried this : sudo nano app.yml

And now I can make changes!

1 Like

Thats great. You’ll have to remember to do this everytime you need to make changes on your instance

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.