You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hmm...I can't reproduce this. This seems to be a permissions issue. My hunch says that the user in your Docker container does not have the right permissions.
I was creating the container with Docker UI in synology DSM 6.2, and the other code server mounted with same dir works fine like I said before so it should have the right permissions
I hear ya but we cannot reproduce with the information you have provided
so more information (like the commands you use to run the code-server
Docker images) may help us identify the issue.
Here is full log after startup, with the latest version
[main 2021-09-17T11:04:48.868Z] [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[main 2021-09-17T11:04:48.875Z] [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[2021-09-17T11:05:49.376Z] info code-server 3.12.0 2661a690ac228872e8d1dc28ab6d33e8afc30add
[2021-09-17T11:05:49.386Z] info Using user-data-dir ~/.local/share/code-server
[2021-09-17T11:05:49.434Z] info Using config file ~/.config/code-server/config.yaml
[2021-09-17T11:05:49.434Z] info HTTP server listening on http://0.0.0.0:8080
[2021-09-17T11:05:49.435Z] info - Authentication is enabled
[2021-09-17T11:05:49.435Z] info - Using password from $PASSWORD
[2021-09-17T11:05:49.436Z] info - Not serving HTTPS
[2021-09-17T11:05:57.438Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:121:19)
at VscodeProvider.sendWebsocket (/usr/lib/code-server/out/node/vscode.js:117:14)
at async /usr/lib/code-server/out/node/routes/vscode.js:205:5
[2021-09-17T11:05:57.476Z] error vscode is not running Error: vscode is not running
at VscodeProvider.send (/usr/lib/code-server/out/node/vscode.js:121:19)
at VscodeProvider.sendWebsocket (/usr/lib/code-server/out/node/vscode.js:117:14)
at async /usr/lib/code-server/out/node/routes/vscode.js:205:5
[main 2021-09-17T11:06:06.950Z] [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[main 2021-09-17T11:06:06.953Z] [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[node.js fs] readdir with filetypes failed with error: [Error: EACCES: permission denied, scandir '/home/coder/project'] {
errno: -13,
code: 'EACCES',
syscall: 'scandir',
path: '/home/coder/project'
}
Huh, this is weird, I am not getting the permission error in the console
but I am unable to view or create files in the project directory.
Replicated in a Coder environment with this:
```
cd /tmp
mkdir test-dir
docker run -it --name code-server -p 8080:8080 \
-v "test-dir:/home/coder/project"
codercom/code-server:latest --auth none
# 1. Open 8080 in a browser
# 2. Browse to the project directory
# 3. Create or edit a file
```
I am able to `touch test-dir/hello` outside of Docker so I have
permissions.
```
$ whoami
coder
$ touch /tmp/test-dir/hello
$ ls -la /tmp/test-dir
total 8
drwxrwxr-x 2 coder coder 4096 2021-09-17 12:16 .
drwxrwxrwt 1 root root 4096 2021-09-17 12:09 ..
-rw-rw-r-- 1 coder coder 0 2021-09-17 12:16 hello
```
Interesting fact: my another code server ( 3.10.2 387b12e ) which I create some months ago works just fine. I have no idea why the new code server wont work even when mounting on the same dir...
Are you running the exact same command while inside the exact same
directory except swapping out `code-server:latest` for
`code-server:3.10.2`? This seems more likely to be related to Docker
than to code-server based on the results so far but if the reproduction
steps have changed please post an update!
Hmm I have no idea why the mounting logic would be different from one
image to another. When I try on 3.10.2 with a relative path it breaks
just like 3.12.0 does. It seems to be a Docker issue?
Here is what I tried:
```
$ cd /tmp
$ mkdir test-dir
$ docker run -it --name code-server -p 8080:8080 -v "test-dir:/home/coder/project" codercom/code-server:3.10.2 --auth none
# Browse to localhost:8080
# Create a file using the file explorer in /home/coder/project
# Get "permission denied"
```
If you use an absolute path instead of relative does it work?
Interestingly, when I try to install code server out of docker, everything works damn fine, so I guess that's an issue produced by docker. I will try to debug by reinstalling docker 🙃
Activity
jsjoeio commentedon Aug 30, 2021
Hmm...I can't reproduce this. This seems to be a permissions issue. My hunch says that the user in your Docker container does not have the right permissions.
cc @code-asher how can they fix this?
YueMiyuki commentedon Aug 30, 2021
Hi there
Yes i know it is a perm issue but my another code-server with the same version work perfectly fine
jsjoeio commentedon Aug 30, 2021
Ah I see. I didn't realize you were running 3.10.2. Does it happen in the latest version of code-server?
YueMiyuki commentedon Sep 5, 2021
Same thing happened in the latest version :/
btw i m using a Synology Device
YueMiyuki commentedon Sep 5, 2021
bruh i miss-click
jsjoeio commentedon Sep 7, 2021
Hmm...okay so this is a permission issue in your Docker environment 🤔
@code-asher any ideas on how to troubleshoot or fix this?
code-asher commentedon Sep 8, 2021
YueMiyuki commentedon Sep 8, 2021
I was creating the container with Docker UI in synology DSM 6.2, and the other code server mounted with same dir works fine like I said before so it should have the right permissions
code-asher commentedon Sep 10, 2021
YueMiyuki commentedon Sep 17, 2021
Hi, sorry for the latency
The commands we used to run the code-server is:
YueMiyuki commentedon Sep 17, 2021
Here is full log after startup, with the latest version
The error changes after updating to latest
jsjoeio commentedon Sep 17, 2021
Usually this log happens if you left code-server open in a tab or window.
I don't recognize this error 🤔 (though I have seen issues with chokidar before).
same error 🤔
Noob question: is there a way to check if the Docker user running code-server has access to
/home/coder/project
? And can we give that user access?code-asher commentedon Sep 17, 2021
4 remaining items
YueMiyuki commentedon Oct 26, 2021
Interesting fact: my another code server ( 3.10.2 387b12e ) which I create some months ago works just fine. I have no idea why the new code server wont work even when mounting on the same dir...
Screen shots:
code-asher commentedon Oct 26, 2021
YueMiyuki commentedon Oct 29, 2021
Yes I am very sure I am running the same command and im in the same dir, I followed the docs 🤔
code-asher commentedon Oct 29, 2021
YueMiyuki commentedon Oct 30, 2021
Interestingly, when I try to install code server out of docker, everything works damn fine, so I guess that's an issue produced by docker. I will try to debug by reinstalling docker 🙃
YueMiyuki commentedon Oct 30, 2021
Alright guys, the same command works perfectly fine on Ubuntu 20.04, but it just won't work on DSM. I have no idea what the heck is happening...
YueMiyuki commentedon Nov 2, 2021
It So confusing... I just open a new droplet on digital ocean and test it... it worked totally fine...
code-asher commentedon Nov 2, 2021
YueMiyuki commentedon Nov 2, 2021
guys this is interesting
After adding
—pid=host
into the command, everything works fine!I have never seen something like this before.. Any idea?
YueMiyuki commentedon Nov 3, 2021
I have just reinstalled the docker... The image works just fine.. Even without --pid=host
So I guess this is an installation issue?
code-asher commentedon Nov 3, 2021
jsjoeio commentedon Nov 3, 2021
Interesting! Should we close this now?
YueMiyuki commentedon Nov 4, 2021
Yes, thank for your help!