-
Notifications
You must be signed in to change notification settings - Fork 344
Permission denied #278
Comments
It would be nice to get an error message when save failed. I had lost some edits due to this because I falsely assumed the file was saved. |
Hi @soerendip , Assuming we're not facing a new bug, the permission issue is a generic docker problem - your identity (linux uid) is different in the image vs on the host, and so most likely the user in the container does not have proper permissions to modify files mounted from your host. You can see for yourself using command The easiest way to avoid this is to work directly in the container, not mounting your workspace from the host (i.e. omit the Finally, there is this user-proposed approach that I could not confirm works, but you might have better luck: #169 (comment)
Agreed - there should be an error message to let the user know when this happens. @vince-fugnitto could you search the main repo for such an issue, create one if none already exists? |
There is a general issue to improve the |
I'm a linux noob but I'll chime in what I did just to get stuff running. Since users can't navigate out of the project folder the ide is running on, I set permissions 777 on the folder that contains the project. |
Thanks for sharing. Your solution is a good start. I'll just mention that if your goal is to interchangeably use the same workspace both on the host and in the theia docker image, you need to make sure your |
For Linux users the most important bit to know is that the image running the IDE needs to use a non-root user which ideally should have the same ID as your user in the host system. Moreover mount paths which don't exist in the host system yet are created by docker with sudo rights. Therefor create all paths before with the non root user to prevent any |
I was building using the same uid/gid combi. This solution works quite well as long as you don't want to share the docker image. In ARG uid
ARG gid
RUN addgroup --gid $gid theia && \
adduser --disabled-password --gecos '' --uid $uid --gid $gid theia && \
adduser theia sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers; Then import the ids while docker build . \
--build-arg uid=$(id -u) \
--build-arg gid=$(id -g) \
--build-arg version=next \
-t theia:next |
@onefork are you running on OSX or linux? gid for me on OSX is 20 and I get the error: |
Hi @snowch, It looks like GID 20 already exists in the base Ubuntu docker image (GID below 1000 or something are reserved for system use IIRC on Linux), which is why you're not allowed to recreate it. Maybe it would work for you to just skip the |
workaround: |
Why are all the permission denied issues here closed without a comment?
I am starting theia with:
Then open an existing file and edit it. Then CTRL-s seemingly does nothing. When pressing save in the file menu also does nothing, but when I look into the stdout I see:
The text was updated successfully, but these errors were encountered: