Skip to content

Unable to create connection to database due to local file system permission limit #1228

@garylavayou

Description

@garylavayou

Bug Report

Current Behavior

  1. Open MongoDB for VS Code
  2. Click "Add mongodb connection"
  3. In the guide page, click "Connect with Connection String", input connection string, like: "mongodb://username:password@localhost:27017".
  4. Press Enter to connect.
  5. The extension shows error message: Unable to load connection: listen EACCES: permission denied /run/user/1000/mongodbvscode_932484_ipc_13_9524.sock

Code/Gist

No code.

Expected Behavior/Code

Connect to database is succeed, and the connection is saved to the sidebar of the extension. You can navigate databses via this connection.

Environment

  • node.js / npm versions:

  • extension version: 1.14.6

  • OS: Ubuntu 22.04.5 LTS/6.6.87.2-microsoft-standard-WSL2

  • VS Code version:

    版本: 1.108.1 (user setup)
    提交: 585eba7c0c34fd6b30faac7c62a42050bfbc0086
    日期: 2026-01-14T14:55:44.241Z
    Electron: 39.2.7
    ElectronBuildId: 12953945
    Chromium: 142.0.7444.235
    Node.js: 22.21.1
    V8: 14.2.231.21-electron.0
    OS: Windows_NT x64 10.0.19045

Possible Solution

To avoid the file permission error, create the socket file under the user's home path like $HOME/.cache/mongodbvscode/ or under the /tmp directory, instead of /run/user/1000, which may not exist and need be created with administrator priviledge.

Additional Context/Screenshots

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions