Cannot install nRF SDK

I have been trying without success to install either the v2.7.0 or v2.8.0 SDK onto my Windows 10 System.  Every time/method I've used results in an error equivalent to

[west]: PermissionError: [WinError 5] Access is denied: 'c:\\ncs\\v2.8.0\\.west\\manifest-tmp\\.git\\objects\\pack\\pack-3f06aca47015057e02d7a46ac30ae6f60657a822.idx'

I've tried going through the nRF Connect plugin for VS Code and through the nRF Connect for Desktop -> Toolchain Manager, trying each as both a normal user and as an administrator.

Nothing seems to make any difference.

A more complete log from the last attempt through VS Code is below:

[west]: === Initializing in c:\ncs\v2.8.0
[west]: --- Cloning manifest repository from github.com/.../sdk-nrf
[west]: Cloning into 'c:\ncs\v2.8.0\.west\manifest-tmp'...
[west]: Updating files:   3% (478/12179)
Updating files:   4% (488/12179)
Updating files:   5% (609/12179)
Updating files:   6% (731/12179)
Updating files:   7% (853/12179)
Updating files:   7% (910/12179)
Updating files:   8% (975/12179)
Updating files:   9% (1097/12179)
Updating files:  10% (1218/12179)
Updating files:  11% (1340/12179)
Updating files:  11% (1404/12179)
Updating files:  12% (1462/12179)
Updating files:  13% (1584/12179)
Updating files:  14% (1706/12179)
Updating files:  15% (1827/12179)
Updating files:  15% (1888/12179)
Updating files:  16% (1949/12179)
Updating files:  17% (2071/12179)
Updating files:  18% (2193/12179)
Updating files:  19% (2315/12179)
Updating files:  19% (2321/12179)
Updating files:  20% (2436/12179)
Updating files:  21% (2558/12179)
Updating files:  22% (2680/12179)
Updating files:  23% (2802/12179)
Updating files:  23% (2805/12179)
Updating files:  24% (2923/12179)
Updating files:  25% (3045/12179)
Updating files:  26% (3167/12179)
Updating files:  26% (3255/12179)
Updating files:  27% (3289/12179)
Updating files:  28% (3411/12179)
Updating files:  29% (3532/12179)
Updating files:  30% (3654/12179)
Updating files:  30% (3752/12179)
Updating files:  31% (3776/12179)
Updating files:  32% (3898/12179)
Updating files:  33% (4020/12179)
Updating files:  34% (4141/12179)
Updating files:  34% (4200/12179)
Updating files:  35% (4263/12179)
Updating files:  36% (4385/12179)
Updating files:  37% (4507/12179)
Updating files:  37% (4620/12179)
Updating files:  38% (4629/12179)
Updating files:  39% (4750/12179)
Updating files:  40% (4872/12179)
Updating files:  41% (4994/12179)
Updating files:  41% (5054/12179)
Updating files:  42% (5116/12179)
Updating files:  43% (5237/12179)
Updating files:  44% (5359/12179)
Updating files:  44% (5459/12179)
Updating files:  45% (5481/12179)
Updating files:  46% (5603/12179)
Updating files:  47% (5725/12179)
Updating files:  48% (5846/12179)
Updating files:  48% (5929/12179)
Updating files:  49% (5968/12179)
Updating files:  50% (6090/12179)
Updating files:  51% (6212/12179)
Updating files:  52% (6334/12179)
Updating files:  52% (6417/12179)
Updating files:  53% (6455/12179)
Updating files:  54% (6577/12179)
Updating files:  55% (6699/12179)
Updating files:  56% (6821/12179)
Updating files:  56% (6881/12179)
Updating files:  57% (6943/12179)
Updating files:  58% (7064/12179)
Updating files:  59% (7186/12179)
Updating files:  60% (7308/12179)
Updating files:  60% (7331/12179)
Updating files:  61% (7430/12179)
Updating files:  62% (7551/12179)
Updating files:  63% (7673/12179)
Updating files:  63% (7761/12179)
Updating files:  64% (7795/12179)
Updating files:  65% (7917/12179)
Updating files:  66% (8039/12179)
Updating files:  67% (8160/12179)
Updating files:  67% (8215/12179)
Updating files:  68% (8282/12179)
Updating files:  69% (8404/12179)
Updating files:  70% (8526/12179)
Updating files:  70% (8633/12179)
Updating files:  71% (8648/12179)
Updating files:  72% (8769/12179)
Updating files:  73% (8891/12179)
Updating files:  74% (9013/12179)
Updating files:  74% (9102/12179)
Updating files:  75% (9135/12179)
Updating files:  76% (9257/12179)
Updating files:  77% (9378/12179)
Updating files:  78% (9500/12179)
Updating files:  78% (9506/12179)
Updating files:  79% (9622/12179)
Updating files:  80% (9744/12179)
Updating files:  81% (9865/12179)
Updating files:  81% (9899/12179)
Updating files:  82% (9987/12179)
Updating files:  83% (10109/12179)
Updating files:  84% (10231/12179)
Updating files:  84% (10282/12179)
Updating files:  85% (10353/12179)
Updating files:  86% (10474/12179)
Updating files:  87% (10596/12179)
Updating files:  87% (10693/12179)
Updating files:  88% (10718/12179)
Updating files:  89% (10840/12179)
Updating files:  90% (10962/12179)
Updating files:  91% (11083/12179)
Updating files:  91% (11099/12179)
Updating files:  92% (11205/12179)
Updating files:  93% (11327/12179)
Updating files:  94% (11449/12179)
Updating files:  94% (11453/12179)
Updating files:  95% (11571/12179)
Updating files:  96% (11692/12179)
Updating files:  97% (11814/12179)
Updating files:  97% (11836/12179)
Updating files:  98% (11936/12179)
Updating files:  99% (12058/12179)
Updating files: 100% (12179/12179)
Updating files: 100% (12179/12179), done.
[west]: Traceback (most recent call last):
[west]:   File "shutil.py", line 847, in move
[west]: PermissionError: [WinError 5] Access is denied: 'c:\\ncs\\v2.8.0\\.west\\manifest-tmp' -> 'c:\\ncs\\v2.8.0\\nrf'
[west]:
[west]: During handling of the above exception, another exception occurred:
[west]:
[west]: Traceback (most recent call last):
[west]:   File "<frozen runpy>", line 198, in _run_module_as_main
[west]:   File "<frozen runpy>", line 88, in _run_code
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\west\app\main.py", line 1085, in main
[west]:     app.run(argv or sys.argv[1:])
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\west\app\main.py", line 244, in run
[west]:     self.run_command(argv, early_args)
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\west\app\main.py", line 503, in run_command
[west]:     self.run_builtin(args, unknown)
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\west\app\main.py", line 611, in run_builtin
[west]:     self.cmd.run(args, unknown, self.topdir,
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\west\commands.py", line 194, in run
[west]:     self.do_run(args, unknown)
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\west\app\project.py", line 224, in do_run
[west]:     topdir = self.bootstrap(args)
[west]:              ^^^^^^^^^^^^^^^^^^^^
[west]:   File "C:\ncs\toolchains\2d382dcd92\opt\bin\Lib\site-packages\west\app\project.py", line 339, in bootstrap
[west]:     shutil.move(os.fspath(tempdir), os.fspath(manifest_abspath))
[west]:   File "shutil.py", line 865, in move
[west]:   File "shutil.py", line 781, in rmtree
[west]:   File "shutil.py", line 635, in _rmtree_unsafe
[west]:   File "shutil.py", line 633, in _rmtree_unsafe
[west]: PermissionError: [WinError 5] Access is denied: 'c:\\ncs\\v2.8.0\\.west\\manifest-tmp\\.git\\objects\\pack\\pack-3d85338b272c4987d7ef205929575b53b7216654.idx'

[west]: exited with code 1.


  • In my experience, "Access is denied" is caused either by:

    1. User account not having permissions to modify the folder/file, or

    2. The folder/file is open in another application which is preventing it from being accessed.

    For #2, simply close any applications that might be using folder/files (including Git clients, if applicable) and try again.

    For #1: If you installed the nRF Command Line Tools / SDK with administrator permissions, you may be able to uninstall it and reinstall without using administrator permissions so your normal user account can modify the install folders.

    If that's not possible, you may be able to fix it by changing the folder permissions in Windows.  DISCLAIMER: changing folder permissions can cause problems, so proceed at your own risk.

    I recommend using Windows Explorer to check the permissions on the C:\ncs and C:\ncs\v2.8.0 folders (my guess is it's one of those two) and verify your user account has permission to modify them.  Right click the folder, Properties, Security tab, click either on "Authenticated Users" or your user account if it's there, and see if "Allow" is checked next to "Modify," "Read," "Write". If not, click the "Edit..." button to change permissions, and check the box next to "Full control" in the "Allow" column.

      

  • Unfortunately I have already gone down the account permissions route and it has not made any difference.  I have tried running as both regular and administrator user.  I have gone into the folder permissions and set them to compete access to all users.  I'm still seeing the exact same issue.

    Also worth mentioning, I tried changing the install location from the default "C:\ncs" to a completely different drive (D:\ncs) and it still gave me a permissions error.

  • Out of desperation I tried manually installing the SDK following the guide at https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation/install_ncs.html and ran into the same error.

    How is a folder/file that is created by the running process not accessible to that same process???

    (v2.6.2) C:\ncs> west init -m github.com/.../sdk-nrf --mr v2.8.0 v2.8.0
    === Initializing in C:\ncs\v2.8.0
    --- Cloning manifest repository from github.com/.../sdk-nrf, rev. v2.8.0
    Cloning into 'C:\ncs\v2.8.0\.west\manifest-tmp'...
    remote: Enumerating objects: 278551, done.
    remote: Counting objects: 100% (1482/1482), done.
    remote: Compressing objects: 100% (969/969), done.
    remote: Total 278551 (delta 797), reused 783 (delta 479), pack-reused 277069 (from 1)
    Receiving objects: 100% (278551/278551), 163.94 MiB | 3.72 MiB/s, done.
    Resolving deltas: 100% (208066/208066), done.
    Note: switching to 'a2386bfc84016fa571f997ac871b25bd67ca481a'.

    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.

    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:

      git switch -c <new-branch-name>

    Or undo this operation with:

      git switch -

    Turn off this advice by setting config variable advice.detachedHead to false

    Updating files: 100% (11871/11871), done.
    Traceback (most recent call last):
      File "shutil.py", line 825, in move
    PermissionError: [WinError 5] Access is denied: 'C:\\ncs\\v2.8.0\\.west\\manifest-tmp' -> 'C:\\ncs\\v2.8.0\\nrf'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "runpy.py", line 197, in _run_module_as_main
      File "runpy.py", line 87, in _run_code
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Scripts\west.exe\__main__.py", line 7, in <module>
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Lib\site-packages\west\app\main.py", line 1085, in main
        app.run(argv or sys.argv[1:])
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Lib\site-packages\west\app\main.py", line 244, in run
        self.run_command(argv, early_args)
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Lib\site-packages\west\app\main.py", line 503, in run_command
        self.run_builtin(args, unknown)
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Lib\site-packages\west\app\main.py", line 611, in run_builtin
        self.cmd.run(args, unknown, self.topdir,
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Lib\site-packages\west\commands.py", line 194, in run
        self.do_run(args, unknown)
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Lib\site-packages\west\app\project.py", line 224, in do_run
        topdir = self.bootstrap(args)
      File "C:\ncs\toolchains\cf2149caf2\opt\bin\Lib\site-packages\west\app\project.py", line 339, in bootstrap
        shutil.move(os.fspath(tempdir), os.fspath(manifest_abspath))
      File "shutil.py", line 843, in move
      File "shutil.py", line 759, in rmtree
      File "shutil.py", line 624, in _rmtree_unsafe
      File "shutil.py", line 624, in _rmtree_unsafe
      File "shutil.py", line 624, in _rmtree_unsafe
      File "shutil.py", line 629, in _rmtree_unsafe
      File "shutil.py", line 627, in _rmtree_unsafe
    PermissionError: [WinError 5] Access is denied: 'C:\\ncs\\v2.8.0\\.west\\manifest-tmp\\.git\\objects\\pack\\pack-5b49292d22e3afbb5af7f020a1d2eb9775c3425d.idx'

  • Hi, 

    Can you share a system report and share with us?

    In the about section of the toolchain manager.

    Regards,
    Jonathan

  • # nRFConnect System Report - 2024-12-05T14-08-56.604Z

    - System:     Dell Inc. XPS 8940
    - BIOS:       Dell Inc. DELL   - 1072009
    - CPU:        1 x Intel Gen Intel® CoreTm i9-11900K 3.5 GHz 16 cores (8 physical)
    - Memory:     31.2 GB free of 63.7 GB total
    - Filesystem: C: (NTFS) 1.9 TB 24.1% used

    - OS:         Microsoft Windows 10 Enterprise (10.0.19045) Windows x64

    - Versions
        - kernel: 10.0.19045
        - git: 2.37.1.windows.1
        - node: 20.18.0
        - python: 3.11.3
        - python3:
        - nrfutil-nrfutil-toolchain-manager: 0.15.0
    - Connected devices:

Related