home directory of user changed owner to ubuntu user
Hello,
after the last update I made a small change in the template, just added one line into the apt-get install command to include the ZIP utility.
Now the whole folder of the user is owned by user ubuntu from group ubuntu and not the user that runs the workspace.
That prevent workspaces from starting correctly as the script will get permissions denied on nearly every file.
I do not use the user ubuntu in any line of my template files. Any idea what is going on? The issue happened on all of our workspaced that I updated to the last version.
I also add a screenshot of the only change in the template:
thank you!
13 Replies
<#1234891132706488341>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hey
could you send your template over ?
Of course!
Dockerfile: https://paste.brcb.eu/cegafaryhe.properties
Main.tf: https://paste.brcb.eu/myrivewybe.sh
Does someone have an idea what can be the issue? 🙂 I read all my templates and the zip package was really all that changed.
If you build and run the image outside of Coder using docker CLI, do you see the same issue?
Eeeh. will try, how? 😄
docker build -t sometag -f Dockerfile .
Okay, is there a location where the dockerfile i stored? Or should I just copy it?
pull your template from coder
coder template pull <TEMPLATE-NAME>
I am unable to start the container on my desktop. Are there any Variables that coder uses to start the container? I am sorry but I never worked with self-built Docker images. :/
I was able to pull the template to my windows machine and build it, but it will instantly crash with exit code 0 after start a container
Okay, made it work to a level that I can access te terminal in docker.
And yes, it created a ubuntu user folder. but as there is no terraform, it will not finish all my scripts and stuff, so I do not know if it works correctly.
but I do not understand adding one package as ZIP zo the dockerfile will do such a change. I really checked in diff checker and the
zip \
line is the only difference.
Maybe it is something with ubuntu 24.04 being used now? as I did not specify the ubuntu version in the docker file?
Anyway, I removed the latest version, took the last working (wihtout the one line) and added ze zip install as a separate RUN sudo apt-get install -y zip
command and now it works just fine 😄
Okay. I think thats the change, ubuntu version change is the issue.
When I starta new workspace, runs fine. When I update an old one, issue appearsSolution
Thank you. We should probably pin Ubuntu version in the example templates
Yea that should help. I tested it on all my workspaces and I can confirm that the issue appears on all of them that were creqated with 23.04 version.
Luckily there is a single fix, just open the terminal on even not fully started workspace (as it fails to start completely) and run
sudo chown -R $USER:$USER /home/$USER
.
Then you restart and workspace works just fine on a new version and can even be updated to a new versions with no problems.Hi there, doing a Discord server search and ran into this same issue. Is adding a
chown
command before startup really the solution here?
Interestingly, I get this error when starting up the upgraded workspace:
though the workspace does start
(btorell is my user)
And SSHing into the server gives me this:
I guess I'll make a new threadIf your base image is Ubuntu 24.04 it contains a built-in user ubuntu with uid 1000. It might be conflicting with your user permissions. You can either delete the built-in user or user a different uid for your user in your Dockerfile