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

EACCES error on directory w/o permissoins #223

Closed
jordemort opened this issue Apr 16, 2020 · 6 comments
Closed

EACCES error on directory w/o permissoins #223

jordemort opened this issue Apr 16, 2020 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@jordemort
Copy link

Similar to #202

I'm using VS Code's Remote SSH functionality to connect to a development server that keeps my workspace mounted on its own file system. Unfortunately, that means my workspace contains a lost+found directory that I don't have permission to read. This leads to the extension failing to start with:

Request initialize failed with message: EACCES: permission denied, scandir '/workspace/enterprise2/lost+found'
@miwarin
Copy link

miwarin commented Apr 17, 2020

I also encountered EACCESS. I want you to ignore EACCESS and continue scanning.

In my case, I could not access because the directory to be scanned is owned by root:root.

[Info  - 13:02:32] BashLanguageServer initializing...
Analyzing files matching glob "**/*@(.sh|.inc|.bash|.command)" inside /home/miwa/work/xxxx
glob error { [Error: EACCES: permission denied, scandir '/home/miwa/work/xxxx/root']
  errno: -13,
  code: 'EACCES',
  syscall: 'scandir',
  path:
   '/home/miwa/work/xxxx/root' }
[Error - 13:02:33] Server initialization failed.
  Message: Request initialize failed with message: EACCES: permission denied, scandir '/home/miwa/work/xxxx/root'
  Code: -32603 
miwa@archlinux[~/work/xxxx]% sudo ls -l root
total 40
drwxr-xr-x 2 root root 36864 Apr 16 15:26 aaaa
drwxr-xr-x 2 root root  4096 Apr 16 15:26 bbbb

@skovhus skovhus self-assigned this Apr 17, 2020
@skovhus skovhus added the bug Something isn't working label Apr 17, 2020
@skovhus
Copy link
Collaborator

skovhus commented Apr 17, 2020

Thanks for reporting this. #224 fixes the issue by not crashing the server but skips cross-file references. There is also a warning encouraging you to update the glob or fix permission issues.

Hope this solves the issue for you.

@jordemort
Copy link
Author

I'm not sure how to update the glob in the VS Code extension to exclude that directory; I tried excluding it from the editor using .vscode/settings.json and that removes it from view from VS Code's perspective but the Bash IDE extension is still trying and failing to scan the directory. There is definitely nothing in there that other scripts reference.

@skovhus
Copy link
Collaborator

skovhus commented Apr 18, 2020

@jordemort fair point. I figured out a way to handle this case by letting the globbing library run in non-strict mode.

@skovhus
Copy link
Collaborator

skovhus commented Apr 18, 2020

A fix has been released, a new server and vscode client is out.

Let me know if it works for you.

@skovhus skovhus closed this as completed Apr 18, 2020
@jordemort
Copy link
Author

Yes, it is working for me now. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants