permission issue running as a service on WSL2

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: 7.0.0-rc1
    • Component/s: None
    • None
    • ALL
    • Hide

      1. Prerequisites: clean Windows / Ubuntu WSL2 install

      2. Follow instructions here for "Install MongoDB".

      https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database

      3. Continue with "Add the init script to start MongoDB as a service"

      MongoDB will not start.

      Show
      1. Prerequisites: clean Windows / Ubuntu WSL2 install 2. Follow instructions here for "Install MongoDB". https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-database 3. Continue with "Add the init script to start MongoDB as a service" MongoDB will not start.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      mongoDB install as a service on WSL2 does not work due to permissions issue with PIDFILE.

      in "init.d" file, Line 149 creates the PIDFILE with sudo priviledges.
      When mongodb is started up as a service, it's started as mongodb:mongodb. This prevents access to the PIDFILE, which prevents mongodb from running.

            Assignee:
            Chris Kelly
            Reporter:
            Mike Shen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: