Permission denied on windows 10 machine

hi i downloaded visual code and installed platformio on it. then i connected my arduino UNO to test this platform, or new way for me of easy programming and try to load the simpel code of blink to my Uno board.
compiling does not go and sending the simple code eigther.
What have i to do to fixe this?
her is de code of the terminal:

> Executing task in folder platformiotest: C:\Users\Dirk\.platformio\penv\Scripts\platformio.exe run <


Processing uno (platform: atmelavr; board: uno; framework: arduino)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR 2.0.0 > Arduino Uno
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash
PACKAGES:
 - framework-arduino-avr 5.0.0
 - toolchain-atmelavr 1.50400.190710 (5.4.0)      
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 5 compatible libraries
Scanning dependencies...    
No dependencies
Building in release mode
Compiling .pio\build\uno\src\main.cpp.o
Archiving .pio\build\uno\libFrameworkArduinoVariant.a
Compiling .pio\build\uno\FrameworkArduino\CDC.cpp.o
Compiling .pio\build\uno\FrameworkArduino\HardwareSerial.cpp.o
Compiling .pio\build\uno\FrameworkArduino\HardwareSerial0.cpp.o
Compiling .pio\build\uno\FrameworkArduino\HardwareSerial1.cpp.o
Compiling .pio\build\uno\FrameworkArduino\HardwareSerial2.cpp.o
Compiling .pio\build\uno\FrameworkArduino\HardwareSerial3.cpp.o
c:\users\dirk\.platformio\packages\toolchain-atmelavr\bin\../lib/gcc/avr/5.4.0/../../../../avr/bin/ar.exe: .pio\build\uno\libFrameworkArduinoVariant.a: Permission denied
*** [.pio\build\uno\libFrameworkArduinoVariant.a] Error 1
Assembler messages:
Fatal error: can't create .pio\build\uno\src\main.cpp.o: Permission denied
*** [.pio\build\uno\src\main.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio\build\uno\FrameworkArduino\CDC.cpp.o: Permission denied
*** [.pio\build\uno\FrameworkArduino\CDC.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio\build\uno\FrameworkArduino\HardwareSerial.cpp.o: Permission denied
*** [.pio\build\uno\FrameworkArduino\HardwareSerial.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio\build\uno\FrameworkArduino\HardwareSerial1.cpp.o: Permission denied
Assembler messages:
Fatal error: can't create .pio\build\uno\FrameworkArduino\HardwareSerial0.cpp.o: Permission denied
*** [.pio\build\uno\FrameworkArduino\HardwareSerial0.cpp.o] Error 1
*** [.pio\build\uno\FrameworkArduino\HardwareSerial1.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio\build\uno\FrameworkArduino\HardwareSerial2.cpp.o: Permission denied
*** [.pio\build\uno\FrameworkArduino\HardwareSerial2.cpp.o] Error 1
Assembler messages:
Fatal error: can't create .pio\build\uno\FrameworkArduino\HardwareSerial3.cpp.o: Permission denied
*** [.pio\build\uno\FrameworkArduino\HardwareSerial3.cpp.o] Error 1
======================================================================================== [FAILED] Took 1.24 seconds ========================================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.
``

Is your project folder located in some folder which has weird permissions?

Do you have an Antivirus active which could block stuff? Can you temporarily disable it?

1 Like

Definitely check your antivirus, especially if you are running Bitdefender… as you’ll find the Anti-Ransomware protection is actively blocking the various compile and linker tools used in the build process since all this is happening in a sub-folder of your Documents folder. Either that, or perhaps the Windows Defender exploit protection or whatever it’s called… I’ve heard that is overly aggressive when it’s enabled.

hi Maxgerhardt and pfeerick, tnx for the answer.

on a calm moment i disconnected my network and wifi and put my antivirus "Bitdefender to sleep.
I then try to do the same af before and my Uno board connected and did compile. I tried to connect with my Mega board and all went well. I then connected my esp Wroom 32 board and for this it had te connect to the internet to get some library files, so i had te wait for that.
in my bitdefender i turned bit by bit everything again on and in the section safe folders i have to add the folder .platfomio. turn back everythigh on in my virusscanner and connect to the internet.

so this problem is solved.
tnx again with putting me in the right direction.
sincerly
Preppie_be

1 Like