# Docker-compose gitea-rootless mkdir permission denied error

**URL:** <https://forum.gitea.com/t/docker-compose-gitea-rootless-mkdir-permission-denied-error/6307>\
**Category:** Install/Maintain/Configure\
**Created:** [November 22, 2022, 11:32am UTC](https://forum.gitea.com/t/docker-compose-gitea-rootless-mkdir-permission-denied-error/6307 "2022-11-22T11:32:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vbreader](https://avatars.discourse-cdn.com/v4/letter/v/da6949/32.png) [@vbreader](https://forum.gitea.com/u/vbreader)\
**Post date:** [November 22, 2022, 11:32am UTC](https://forum.gitea.com/t/docker-compose-gitea-rootless-mkdir-permission-denied-error/6307/1 "2022-11-22T11:32:22Z")

</div>

Get these errors when trying to use docker-compose and gitea-rootless.

I’ve followed the docs.  
Tried adding  
user: “\<…\>”  
USER\_UID=\<…\>  
USER\_GID=\<…\>  
making the directory in host and giving everyone permission to it (which doesnt make sense ,I know)  
messing around with the users & groups on the host etc.  
tested gitea-rootless version 1.17.3 too.

By changing things and trying with and without named volumes I’ve been able to get these two msgs from the docker logs, where the mkdir error is by far the most often occuring:

* * *

/var/lib/gitea/git is not writable  
mkdir: can’t create directory ‘/var/lib/gitea/git’: Permission denied

* * *

/var/lib/gitea/git is not writable  
chmod: /var/lib/gitea/git: Operation not permitted

* * *

Im using docker version 20.10.21. and the latest gitea-rootless on ubuntu 22.04.

---

<div class="post-metadata">

**Author:** ![ScarUY](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/scaruy/32/3361_2.png) [@ScarUY](https://forum.gitea.com/u/ScarUY)\
**Post date:** [January 13, 2023, 1:45pm UTC](https://forum.gitea.com/t/docker-compose-gitea-rootless-mkdir-permission-denied-error/6307/2 "2023-01-13T13:45:30Z")

</div>

Did you manage to find a solution? I’m having the same problem.

---

<div class="post-metadata">

**Author:** ![vbreader](https://avatars.discourse-cdn.com/v4/letter/v/da6949/32.png) [@vbreader](https://forum.gitea.com/u/vbreader)\
**Post date:** [January 13, 2023, 8:01pm UTC](https://forum.gitea.com/t/docker-compose-gitea-rootless-mkdir-permission-denied-error/6307/3 "2023-01-13T20:01:00Z")

</div>

No, chose another installation method. Good luck though 😊

![~WRD0001.jpg](https://us1.discourse-cdn.com/flex020/uploads/gitea/original/2X/5/52d5f1c08649212fe6768d2cacdcf8df711810d9.jpeg)
