# Cannot use custom font on Streamlit Cloud: PermissionError

**URL:** <https://discuss.streamlit.io/t/cannot-use-custom-font-on-streamlit-cloud-permissionerror/74492>\
**Category:** Using Streamlit\
**Tags:** css, streamlit-cloud, debugging\
**Created:** [July 9, 2024, 7:32pm UTC](https://discuss.streamlit.io/t/cannot-use-custom-font-on-streamlit-cloud-permissionerror/74492 "2024-07-09T19:32:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattiatantardini](https://sea2.discourse-cdn.com/streamlit/user_avatar/discuss.streamlit.io/mattiatantardini/32/45960_2.png) [@mattiatantardini](https://discuss.streamlit.io/u/mattiatantardini)\
**Post date:** [July 9, 2024, 7:32pm UTC](https://discuss.streamlit.io/t/cannot-use-custom-font-on-streamlit-cloud-permissionerror/74492/1 "2024-07-09T19:32:26Z")

</div>

I got a PermissionError on Streamlit Cloud when I try to write a font file to the /static/assets folder to allow streamlit to use the custom font, as explained in [this discussion](https://discuss.streamlit.io/t/local-custom-font/30541/6).

Locally it works fine, but I guess there may correctly be restrictive permission settings on system folders on the streamlit machine. Questions:

1. is there the possibility to change the permission and write to the /static folder?
2. is it possibile to write to another location and keep the proposed solution in the discussion working? (I’m not an expert in css and web development, but I guess it is mandatory to have the file in the /static folder)
3. if it is not possible, is there any other solution?

Code is publicly available on [github](https://github.com/mattiatantardini/maddiegiulio/tree/main). The code that moves the font files to the /static folder is in [app.py](https://github.com/mattiatantardini/maddiegiulio/blob/main/app.py). Traceback is the following:

```auto
File "/home/adminuser/venv/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 589, in _run_script
    exec(code, module. __dict__ )
File "/mount/src/maddiegiulio/app.py", line 30, in <module>
    font_path.mkdir(exist_ok=True, parents=True)
File "/usr/local/lib/python3.11/pathlib.py", line 1120, in mkdir
    self.parent.mkdir(parents=True, exist_ok=True)
File "/usr/local/lib/python3.11/pathlib.py", line 1116, in mkdir
    os.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/home/adminuser/venv/lib/python3.11/site-packages/streamlit/static/assets'

```

Python version: 3.11.9, streamlit version: 1.36.0

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/streamlit/original/3X/c/f/cf4c2ee0d938358f82448c5fe4b9c3c91d7ce19c.svg) [@system](https://discuss.streamlit.io/u/system)\
**Post date:** [January 5, 2025, 7:33pm UTC](https://discuss.streamlit.io/t/cannot-use-custom-font-on-streamlit-cloud-permissionerror/74492/2 "2025-01-05T19:33:23Z")

</div>

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