# Permission error using docker compose

**URL:** <https://forum.rasa.com/t/permission-error-using-docker-compose/40456>\
**Category:** Rasa Open Source\
**Created:** [February 21, 2021, 11:27pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456 "2021-02-21T23:27:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zen\_alchemist](https://avatars.discourse-cdn.com/v4/letter/z/e36b37/32.png) [@zen\_alchemist](https://forum.rasa.com/u/zen_alchemist)\
**Post date:** [February 21, 2021, 11:27pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/1 "2021-02-21T23:27:57Z")

</div>

I’m trying to deploy my assistant using Docker compose via the instructions here: [Deploying a Rasa Open Source Assistant in Docker Compose](https://rasa.com/docs/rasa/docker/deploying-in-docker-compose).

I have a Ubuntu (20.4) server. However, running “sudo docker-compose up” I get a “PermissionError: [Errno 13] Permission denied: ‘models’” along with other permission access errors trying to attach to my container. I’ve resorted to operating as the root user, still nothing.

I have mounted the etc/rasa directories and opened up permissions, but I didn’t think I needed to do that anyways for Rasa Open Source. What am I missing?

Full error:

Starting albert\_rasa\_1 … done Starting albert\_app\_1 … done Attaching to albert\_app\_1, albert\_rasa\_1 app\_1 | 2021-02-21 23:22:54 INFO rasa\_sdk.endpoint - Starting action endpoint server… app\_1 | 2021-02-21 23:22:54 INFO rasa\_sdk.executor - Registered function for ‘action\_hello\_world’. app\_1 | 2021-02-21 23:22:54 INFO rasa\_sdk.endpoint - Action endpoint is up and running on [http://localhost:5055](http://localhost:5055) rasa\_1 | Matplotlib created a temporary config/cache directory at /tmp/matplotlib-3z822bk2 because the default path (/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing. rasa\_1 | 2021-02-21 23:22:56.061967: W tensorflow/stream\_executor/platform/default/dso\_loader.cc:59] Could not load dynamic library ‘libcudart.so.10.1’; dlerror: libcudart.so.10.1: cannot open shared object file: No such file or directory rasa\_1 | 2021-02-21 23:22:56.062724: I tensorflow/stream\_executor/cuda/cudart\_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. rasa\_1 | 2021-02-21 23:22:59 WARNING rasa.utils.common - Failed to write global config. Error: [Errno 13] Permission denied: ‘/.config’. Skipping. rasa\_1 | Traceback (most recent call last): rasa\_1 | File “/opt/venv/bin/rasa”, line 8, in rasa\_1 | sys.exit(main()) rasa\_1 | File “/opt/venv/lib/python3.8/site-packages/rasa/ **main**.py”, line 116, in main rasa\_1 | cmdline\_arguments.func(cmdline\_arguments) rasa\_1 | File “/opt/venv/lib/python3.8/site-packages/rasa/cli/run.py”, line 113, in run rasa\_1 | args.model = \_validate\_model\_path(args.model, “model”, DEFAULT\_MODELS\_PATH) rasa\_1 | File “/opt/venv/lib/python3.8/site-packages/rasa/cli/run.py”, line 71, in \_validate\_model\_path rasa\_1 | os.makedirs(default, exist\_ok=True) rasa\_1 | File “/usr/lib/python3.8/os.py”, line 223, in makedirs rasa\_1 | mkdir(name, mode) rasa\_1 | PermissionError: [Errno 13] Permission denied: ‘models’ albert\_rasa\_1 exited with code 1

---

<div class="post-metadata">

**Author:** ![desmarchris](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/desmarchris/32/12277_2.png) [@desmarchris](https://forum.rasa.com/u/desmarchris)\
**Post date:** [February 23, 2021, 6:58pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/2 "2021-02-23T18:58:16Z")

</div>

Hey @zen_alchemist,

Are you trying to run this in etc/rasa? Since you’re not using Rasa X, have you tried just running it in your user’s home directory?

---

<div class="post-metadata">

**Author:** ![zen\_alchemist](https://avatars.discourse-cdn.com/v4/letter/z/e36b37/32.png) [@zen\_alchemist](https://forum.rasa.com/u/zen_alchemist)\
**Post date:** [February 23, 2021, 7:02pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/3 "2021-02-23T19:02:45Z")

</div>

I was originally running it in the user’s home directory, with the same issues. I was able to work around the issue for now by opening up permissions to the root group for the entire “opt/” directory. Do you think that’s a sustainable solution?

---

<div class="post-metadata">

**Author:** ![desmarchris](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/desmarchris/32/12277_2.png) [@desmarchris](https://forum.rasa.com/u/desmarchris)\
**Post date:** [February 23, 2021, 9:21pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/4 "2021-02-23T21:21:12Z")

</div>

hmm I’m not sure actually, it should be fine but I’ll ask around. Did you change permissions to 777 or change the user to yourself?

---

<div class="post-metadata">

**Author:** ![zen\_alchemist](https://avatars.discourse-cdn.com/v4/letter/z/e36b37/32.png) [@zen\_alchemist](https://forum.rasa.com/u/zen_alchemist)\
**Post date:** [February 23, 2021, 11:15pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/5 "2021-02-23T23:15:05Z")

</div>

I changed it to the root group and then permissions to 777. I gracefully copied the command “sudo chgrp -R root /etc/rasa/\* && sudo chmod -R 777 /etc/rasa/\*” from [here](https://rasa.com/docs/rasa-x/installation-and-setup/install/docker-compose#permissions-on-mounted-directories) but ran them for /opt instead.

Do you know why I was having permissions issues initially? Makes me a bit uneasy not to know why I had to use this workaround.

---

<div class="post-metadata">

**Author:** ![desmarchris](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/desmarchris/32/12277_2.png) [@desmarchris](https://forum.rasa.com/u/desmarchris)\
**Post date:** [February 26, 2021, 5:01pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/6 "2021-02-26T17:01:15Z")

</div>

hey @zen_alchemist sorry I missed your last message.

I think by default your user doesn’t have the right permissions to use `/opt` on a VM but it’s where python installs the packages. So I believe it’s pretty standard to change the permissions to allow your user access to these packages.

---

<div class="post-metadata">

**Author:** ![zen\_alchemist](https://avatars.discourse-cdn.com/v4/letter/z/e36b37/32.png) [@zen\_alchemist](https://forum.rasa.com/u/zen_alchemist)\
**Post date:** [February 26, 2021, 5:14pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/7 "2021-02-26T17:14:06Z")

</div>

Cool. Glad it’s a standard. Thanks for getting back to me!

---

<div class="post-metadata">

**Author:** ![EmilianoAguayo](https://avatars.discourse-cdn.com/v4/letter/e/45deac/32.png) [@EmilianoAguayo](https://forum.rasa.com/u/EmilianoAguayo)\
**Post date:** [July 21, 2021, 2:42pm UTC](https://forum.rasa.com/t/permission-error-using-docker-compose/40456/9 "2021-07-21T14:42:17Z")

</div>

could you share the command you used?
