IDE hangs on startup: "EPERM: operation not permitted, mkdir ..."

PS C:\Users\PC\AppData\Local\Programs\arduino-ide> & ".\Arduino IDE"
PS C:\Users\PC\AppData\Local\Programs\arduino-ide>
Arduino IDE 2.3.2
Checking for frontend application configuration customizations. Module path: C:\Users\PC\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\electron-main.js, destination 'package.json': C:\Users\PC\AppData\Local\Programs\arduino-ide\resources\app\package.json
Setting 'theia.frontend.config.appVersion' application configuration value to: "2.3.2" (type of string)
Setting 'theia.frontend.config.cliVersion' application configuration value to: "0.35.3" (type of string)
Setting 'theia.frontend.config.buildDate' application configuration value to: "2024-02-20T10:04:35.814Z" (type of string)
Frontend application configuration after modifications: {"applicationName":"Arduino IDE","defaultTheme":{"light":"arduino-theme","dark":"arduino-theme-dark"},"defaultIconTheme":"none","electron":{"windowOptions":{}},"defaultLocale":"","validatePreferencesSchema":false,"preferences":{"window.title":"${rootName}${activeEditorShort}${appName}","files.autoSave":"afterDelay","editor.minimap.enabled":false,"editor.tabSize":2,"editor.scrollBeyondLastLine":false,"editor.quickSuggestions":{"other":false,"comments":false,"strings":false},"editor.maxTokenizationLineLength":500,"editor.bracketPairColorization.enabled":false,"breadcrumbs.enabled":false,"workbench.tree.renderIndentGuides":"none","explorer.compactFolders":false},"appVersion":"2.3.2","cliVersion":"0.35.3","buildDate":"2024-02-20T10:04:35.814Z"}
Starting backend process. PID: 8232
Using browser-only version of superagent in non-browser environment
Configuration directory URI: 'file:///c%3A/Users/PC/.arduinoIDE'
Configuring to accept webviews on '^.+\.webview\..+$' hostname.
2024-06-22T06:48:37.027Z root INFO Backend Object.initialize: 5.0 ms [Finished 0.476 s after backend start]
2024-06-22T06:48:37.028Z root INFO Backend Object.configure: 4.7 ms [Finished 0.477 s after backend start]
2024-06-22T06:48:37.028Z root INFO Backend s.onStart: 3.2 ms [Finished 0.477 s after backend start]
2024-06-22T06:48:37.028Z root INFO Backend s.configure: 0.3 ms [Finished 0.499 s after backend start]
2024-06-22T06:48:37.029Z root INFO Backend d.onStart: 0.2 ms [Finished 0.499 s after backend start]
2024-06-22T06:48:37.030Z root INFO Backend d.configure: 0.1 ms [Finished 0.499 s after backend start]
2024-06-22T06:48:37.031Z root INFO Backend d.initialize: 22.0 ms [Finished 0.499 s after backend start]
2024-06-22T06:48:37.031Z root INFO Backend c.onStart: 0.2 ms [Finished 0.499 s after backend start]
2024-06-22T06:48:37.031Z root INFO Backend a.configure: 1.0 ms [Finished 0.500 s after backend start]
2024-06-22T06:48:37.032Z config INFO >>> Initializing CLI configuration...
2024-06-22T06:48:37.032Z root INFO Backend c.initialize: 0.4 ms [Finished 0.500 s after backend start]
2024-06-22T06:48:37.032Z root INFO Backend R.onStart: 0.6 ms [Finished 0.501 s after backend start]
2024-06-22T06:48:37.033Z config INFO Loading CLI configuration from c:\Users\PC\.arduinoIDE\arduino-cli.yaml...
2024-06-22T06:48:37.033Z daemon INFO Starting daemon from C:\Users\PC\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\resources\arduino-cli.exe...
2024-06-22T06:48:37.034Z root INFO Backend a.initialize: 0.5 ms [Finished 0.502 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend w.onStart: 1.1 ms [Finished 0.502 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend r.configure: 1.9 ms [Finished 0.503 s after backend start]
2024-06-22T06:48:37.034Z discovery-log INFO start
2024-06-22T06:48:37.034Z discovery-log INFO start new deferred
2024-06-22T06:48:37.034Z root INFO Backend d.initialize: 0.3 ms [Finished 0.503 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend y.onStart: 1.6 ms [Finished 0.504 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend r.configure: 1.3 ms [Finished 0.504 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend a.onStart: 0.4 ms [Finished 0.505 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend h.configure: 0.3 ms [Finished 0.505 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend s.configure: 0.1 ms [Finished 0.506 s after backend start]
2024-06-22T06:48:37.034Z root INFO Backend l.configure: 0.0 ms [Finished 0.506 s after backend start]
2024-06-22T06:48:37.036Z root INFO Theia app listening on http://127.0.0.1:50517.
2024-06-22T06:48:37.036Z root INFO Finished starting backend application: 2.3 ms [Finished 0.508 s after backend start]
2024-06-22T06:48:37.055Z root WARN The local plugin referenced by local-dir:/c%3A/Users/PC/.arduinoIDE/plugins does not exist.
2024-06-22T06:48:37.055Z root WARN The local plugin referenced by local-dir:/c%3A/Users/PC/.arduinoIDE/extensions does not exist.
2024-06-22T06:48:37.056Z root WARN The local plugin referenced by local-dir:C:\Users\PC\.arduinoIDE\plugins does not exist.
Restoring workspace roots: c:\Users\PC\Downloads\CODE_SERVO.ino
isTempSketch: false. Input was c:\Users\PC\Downloads\CODE_SERVO.ino
2024-06-22T06:48:37.066Z root ERROR Uncaught Exception:  Error: EPERM: operation not permitted, mkdir 'C:\Users\PC\.arduinoIDE'
2024-06-22T06:48:37.066Z root ERROR Error: EPERM: operation not permitted, mkdir 'C:\Users\PC\.arduinoIDE'
2024-06-22T06:48:37.097Z root INFO Resolve plugins list: 63.7 ms [Finished 0.568 s after backend start]
2024-06-22T06:48:37.194Z root INFO Error: Error executing C:\Users\PC\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\resources\arduino-cli.exe config init --dest-dir c:\Users\PC\.arduinoIDE: Cannot create config file directory: mkdir c:\Users\PC\.arduinoIDE: Access is denied.
    at ChildProcess.<anonymous> (C:\Users\PC\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\main.js:2:639804)
    at ChildProcess.emit (node:events:514:28)
    at Process.onexit (node:internal/child_process:291:12)
2024-06-22T06:48:37.194Z config ERROR Failed to initialize the CLI configuration. Error: Error executing C:\Users\PC\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\resources\arduino-cli.exe config init --dest-dir c:\Users\PC\.arduinoIDE: Cannot create config file directory: mkdir c:\Users\PC\.arduinoIDE: Access is denied.
    at ChildProcess.<anonymous> (C:\Users\PC\AppData\Local\Programs\arduino-ide\resources\app\lib\backend\main.js:2:639804)
    at ChildProcess.emit (node:events:514:28)
    at Process.onexit (node:internal/child_process:291:12)
2024-06-22T06:48:37.201Z daemon INFO time="2024-06-22T13:48:37+07:00" level=info msg="Config file not found, using default values"
time="2024-06-22T13:48:37+07:00" level=info msg="arduino-cli.exe version 0.35.3"
time="2024-06-22T13:48:37+07:00" level=info msg="Executing `arduino-cli daemon`"
Daemon is now listening on 127.0.0.1:50519
{"IP":"127.0.0.1","Port":"50519"}
2024-06-22T06:48:37.201Z daemon INFO Daemon is running.
2024-06-22T06:48:37.271Z daemon INFO time="2024-06-22T13:48:37+07:00" level=info msg="Checking signature" index="C:\\Users\\PC\\AppData\\Local\\Arduino15\\package_index.json" signatureFile="C:\\Users\\PC\\AppData\\Local\\Arduino15\\package_index.json.sig" trusted=true
time="2024-06-22T13:48:37+07:00" level=info msg="Loading hardware from: C:\\Users\\PC\\AppData\\Local\\Arduino15\\packages"
time="2024-06-22T13:48:37+07:00" level=info msg="Loading package builtin from: C:\\Users\\PC\\AppData\\Local\\Arduino15\\packages\\builtin"
time="2024-06-22T13:48:37+07:00" level=info msg="Checking existence of 'tools' path: C:\\Users\\PC\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
time="2024-06-22T13:48:37+07:00" level=info msg="Loading tools from dir: C:\\Users\\PC\\AppData\\Local\\Arduino15\\packages\\builtin\\tools"
time="2024-06-22T13:48:37+07:00" level=info msg="Loaded tool" tool="builtin:ctags@5.8-arduino11"
time="2024-06-22T13:48:37+07:00" level=info msg="Loaded tool" tool="builtin:dfu-discovery@0.1.2"
time="2024-06-22T13:48:37+07:00" level=info msg="Loaded tool" tool="builtin:mdns-discovery@1.0.9"
time="2024-06-22T13:48:37+07:00" level=info msg="Loaded tool" tool="builtin:serial-discovery@1.4.1"
time="2024-06-22T13:48:37+07:00" level=info msg="Loaded tool" tool="builtin:serial-monitor@0.14.1"
time="2024-06-22T13:48:37+07:00" level=info msg="Loading libraries index file" index="C:\\Users\\PC\\AppData\\Local\\Arduino15\\library_index.json"
2024-06-22T06:48:37.451Z daemon INFO time="2024-06-22T13:48:37+07:00" level=info msg="Adding libraries dir" dir="C:\\Users\\PC\\AppData\\Local\\Arduino15\\libraries" location=ide
time="2024-06-22T13:48:37+07:00" level=info msg="Adding libraries dir" dir="C:\\Users\\PC\\Documents\\Arduino\\libraries" location=user
Opening channel for service path '/services/electron-window'.
Opening channel for service path '/services/ide-updater'.
2024-06-22T06:48:38.780Z root ERROR Failed to initialize global state path: Error: EPERM: operation not permitted, mkdir 'c:\Users\PC\.arduinoIDE'
2024-06-22T06:48:38.856Z root WARN Frontend a.configure took longer than the expected maximum 100 milliseconds: 162.0 ms [Finished 1.712 s after frontend start]
2024-06-22T06:48:38.856Z root WARN A command editor.action.toggleStickyScroll is already registered.
2024-06-22T06:48:39.087Z root WARN Frontend D.onStart took longer than the expected maximum 100 milliseconds: 140.3 ms [Finished 1.979 s after frontend start]

Hi @thong1703. I see the error that is preventing Arduino IDE from starting here:

Arduino IDE stored configuration files in a dedicated folder at this path on your computer:

C:\Users\PC\.arduinoIDE

However, the operating system is not allowing Arduino IDE to create that folder.

Unfortunately I don't know what would cause this error to occur. Do you have any idea about why Arduino IDE can't create the folder? Is there anything notable about your system that might cause this?

Maybe your C:\ hard drive is full?