Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Update to 3.2.0 fails with EACCES: permission denied... #1622

Closed
luisjakon opened this issue May 11, 2020 · 9 comments
Closed

Automatic Update to 3.2.0 fails with EACCES: permission denied... #1622

luisjakon opened this issue May 11, 2020 · 9 comments

Comments

@luisjakon
Copy link

I am using the try command as per the github page:

$ docker run -it -p 8080:8080 -v "$PWD:/home/coder/project" \ 
-u "$(id -u):$(id -g)" codercom/code-server:latest

However, I am then presented with an update prompt for 3.2.0...but when I click on it, I get the following error:

"EACCES: permission denied, rename '/usr/lib/code-server' -> '/usr/lib/code-server.1589216663446'"

I see the /usr/lib directory is owned by root:root but even if I manually chown it to coder:users it fails to update...

I am on Linux Docker version 18.09.8

Is there a solution for this? Many Thanks!

@code-asher
Copy link
Member

We're going to remove the automatic updating soon. That said, the chown should work but you'll also need to give it access to /usr/lib/code-server so it can move the old version. You can also pass --disable-updates to disable the prompt.

@code-asher
Copy link
Member

code-asher commented May 11, 2020

Actually if coder owns /usr/lib it should be able to move the directory just fine. 🤔 What error did it give after doing the chown?

@luisjakon
Copy link
Author

After chowning to coder and running the upgrade it craps out and exits the container...

$ docker run -it -p 8500:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest
info  code-server 3.2.0-rc.6 19ff74650b1b001d33d5c0207e311dd7c0ff4d2f
info  HTTP server listening on http://0.0.0.0:8080
info    - Password is db79922ae7d87eea2453cf5b
info      - To use your own password set the PASSWORD environment variable
info      - To disable use `--auth none`
info    - Not serving HTTPS
info  Automatic updates are enabled
info  Relaunching: 3.2.0-rc.6 -> 3.2.0
error Uncaught exception: spawn /usr/lib/code-server/lib/node ENOENT
error Error: spawn /usr/lib/code-server/lib/node ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
    at onErrorNT (internal/child_process.js:469:16)
    at processTicksAndRejections (internal/process/task_queues.js:84:21)

@code-asher
Copy link
Member

Ahhhh, I see. That's unfortunate. So the Docker container is actually currently a bit ahead of 3.2.0 and it changes the structure a little so automatic updates (technically downgrade in this case) don't work.

@code-asher
Copy link
Member

I think for now the best thing is to launch with --disable-updates and in the next version we'll remove automatic updates.

@ikisis
Copy link

ikisis commented May 14, 2020

can i know how set --disable-updates parameter on launch? like -e "--disable-updates" ?

@code-asher
Copy link
Member

You should be able to add it to the end of the command like so:

docker run -it -p 8500:8080 -v "$PWD:/home/coder/project" -u "$(id -u):$(id -g)" codercom/code-server:latest --disable-updates

@sboulema
Copy link

If you want to do this while using a docker-compose file use this:

entrypoint: ["dumb-init", "fixuid", "-q", "/usr/bin/code-server", "--bind-addr", "0.0.0.0:8080", ".", "--disable-updates"]

@nhooyr
Copy link
Contributor

nhooyr commented May 18, 2020

We've removed automatic updates.

Please install and use the latest release manually. Sorry for the troubles!

@nhooyr nhooyr closed this as completed May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants