Permission denied when trying to start coder container
Hello! I have copied the example compose file and changesdvolumes to bind mounts. However, when I start container I get permission error:
error: create cache directory: mkdir /home/coder/.cache: permission denied
Here's the compose:
22 Replies
<#1376386277795958875>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
could you share your full terraform template please?
It's default docker template with no changes
let me take a look then
is it the regular docker template or the devcontainers one?
regular docker
I've solved the problem by moving docker data-root to the storage in unRAID but that obviously is not perfect
are you able to open a terminal and run
stat /home/coder
in a scenario where this is broken?as in, open shell inside coder container or inside workspace?
inside the workspace
no, I can't even create workspace
it does not start coder container because of this permission error
are you sure it's not just in a failed state? you should still be able to open a terminal
hm let me recrete the container to check
you can also send a screenshot if you want
yea it does not even start

can you send a screenshot of the full page?


oh sorry, I thought you meant that the workspaces themselves had this error!
this is something that happened recently so I thought it could be related
the solution would be to remove the mount you set up on
/home/coder
this line: - /mnt/user/Coder/home:/home/coder
is there any particular reason you set that up? you do not need to persist it at all as all the data/state is stored in the postgres databasehm? Isn't the home directory active when I open workspace?
like, it would store all my persistent data etc
no! the way Coder works is it creates new containers and volumes for each workspace
oh I see now
thanks
why the need for /home/coder then?
anyway, I still wanted to have these volumes created on my SSD ZFS array rather than USB thumbstick unraid runs on or HDD array
hey, sorry for the delay, it is not needed for the Coder server itself, it is needed for the Coder workspaces
/home/coder
is persisted by your Docker template and it creates a volume, the Coder server container actually is only responsible for deploying the containers that your workspaces use