Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

/usr/bin/code-server: Permission denied #209

Open
yohcop opened this issue Jun 1, 2019 · 2 comments
Open

/usr/bin/code-server: Permission denied #209

yohcop opened this issue Jun 1, 2019 · 2 comments

Comments

@yohcop
Copy link

yohcop commented Jun 1, 2019

I have a very simple .sail/Dockerfile in my project:

FROM codercom/ubuntu-dev:latest

But when I run sail, I get permission denied on code-server.

> sudo sail run --ssh [email protected]/yohcop/tri-report.git
2019-06-01 11:32:45 INFO	running docker build --network=host -t yohcop_tri-report -f /home/y/Projects/yohcop/tri-report/.sail/Dockerfile /home/y/Projects/yohcop/tri-report --label com.coder.sail.base_image=yohcop_tri-report
Sending build context to Docker daemon  2.715MB
Step 1/2 : FROM codercom/ubuntu-dev:latest
 ---> 1c089a10e31f
Step 2/2 : LABEL com.coder.sail.base_image=yohcop_tri-report
 ---> Using cache
 ---> e43a8b060529
Successfully built e43a8b060529
Successfully tagged yohcop_tri-report:latest
2019-06-01 11:32:45 INFO	using repo image yohcop_tri-report
2019-06-01 11:32:45 INFO	writing sail proxy logs to /tmp/sailproxy_yohcop_tri-report955191676
2019-06-01 11:32:45 ERROR	failed to wait for project to be online: container yohcop_tri-report not running
+ cd /home/user/tri-report
+ sudo chown user:user /home/user/.vscode
+ tee /tmp/code-server.log
+ code-server --host localhost --port 0 --data-dir /home/user/.config/Code --extensions-dir /home/user/.vscode/host-extensions --extra-extensions-dir /home/user/.vscode/extensions --allow-http --no-auth
bash: line 5: /usr/bin/code-server: Permission denied
2019-06-01 11:32:45 ERROR	build run failed: container yohcop_tri-report not running

The weird thing is if I run sudo docker run -it yohcop_tri-report bash, and then try to run /usr/bin/code-server, with with all the flags (except --extra-extensions-dir, which seems to be problematic), it starts fine. I also checked the permissions, and they are set correctly

-rwxr-xr-x 1 root root 94698820 Apr 24 00:18 /usr/bin/code-server

So it's probably a permission denied on something else.

Any ideas?
Thanks!

@nathanpotter
Copy link
Contributor

could you provide the output of the docker logs for the failed container startup?

@sr229
Copy link

sr229 commented Jun 22, 2019

@nathanpotter we don't need the docker logs, the logs alone above already tells the issue.

Looks like the code-server binary has no executable permissions. Probably an error in how it was chmod'ed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants