Permission denied compiling node

Apologies if this has been asked/answered before but the last hour of googling has not turned up any answers I can understand what to do.

I have just installed EspHome through the supervisor addon and am trying to compile my first Esphome to one of the new Sonoff NSPanels following the great video by @masto.

However, every time I try to compile this I am getting permission denied errors. Any help or guidance of how to solve this appreciated.

My environment (from Esphome container logs)

-----------------------------------------------------------
 Add-on: ESPHome
 ESPHome add-on for intelligently managing all your ESP8266/ESP32 devices
-----------------------------------------------------------
 Add-on version: 2022.1.2
 You are running the latest version of this add-on.
 System: Raspbian GNU/Linux 10 (buster)  (armv7 / raspberrypi4)
 Home Assistant Core: 2021.12.8
 Home Assistant Supervisor: 2021.12.2
-----------------------------------------------------------

The compile output

INFO Reading configuration /config/esphome/nspanel-demo.yaml...
WARNING GPIO4 is a Strapping PIN and should be avoided.
Attaching external pullup/down resistors to strapping pins can cause unexpected failures.
See https://esphome.io/guides/faq.html#why-am-i-getting-a-warning-about-strapping-pins
INFO Generating C++ source...
INFO Compiling app...
Processing nspanel-demo (board: esp32dev; framework: arduino; platform: platformio/espressif32 @ 3.3.2)
--------------------------------------------------------------------------------
Platform Manager: Installing platformio/espressif32 @ 3.3.2
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Platform Manager: espressif32 @ 3.3.2 has been installed!
The platform 'platformio/espressif32 @ 3.3.2' has been successfully installed!
The rest of the packages will be installed later depending on your build environment.
Tool Manager: Installing platformio/toolchain-xtensa32 @ ~2.50200.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: toolchain-xtensa32 @ 2.50200.97 has been installed!
Tool Manager: Installing platformio/framework-arduinoespressif32 @ ~3.10006.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: framework-arduinoespressif32 @ 3.10006.210326 has been installed!
Tool Manager: Installing platformio/tool-esptoolpy @ ~1.30100.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: tool-esptoolpy @ 1.30100.210531 has been installed!
Tool Manager: Installing platformio/tool-scons @ ~4.40300.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
Tool Manager: tool-scons @ 4.40300.1 has been installed!
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
Dependency Graph
|-- <WiFi> 1.0
|-- <Update> 1.0
|-- <WiFiClientSecure> 1.0
|-- <HTTPClient> 1.2
|-- <ESPmDNS> 1.0
Compiling /data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/adc/adc_sensor.cpp.o
sh: 1: xtensa-esp32-elf-g++: Permission denied
Compiling /data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/api/api_connection.cpp.o
sh: 1: xtensa-esp32-elf-g++: Permission denied
Compiling /data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/api/api_frame_helper.cpp.o
sh: 1: xtensa-esp32-elf-g++: Permission denied
*** [/data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/adc/adc_sensor.cpp.o] Error 126
Compiling /data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/api/api_pb2.cpp.o
*** [/data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/api/api_connection.cpp.o] Error 126
*** [/data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/api/api_frame_helper.cpp.o] Error 126
sh: 1: xtensa-esp32-elf-g++: Permission denied
*** [/data/nspanel-demo/.pioenvs/nspanel-demo/src/esphome/components/api/api_pb2.cpp.o] Error 126
========================= [FAILED] Took 49.90 seconds =========================

The power of google :slight_smile:

I have found this and the linked one but I don’t understand what it is saying to do. I’m running the HA docker image so can’t amend that and add a mounted volume and my folders have execute permissions. They are on an NVMe drive attached to my PI4.

Sorry, should be more clear - in my etc/fstab the drive already has exec set.

# SSD Drive
UUID="cc507039-06f3-4516-b01b-1bf49aaa0e3a" /mnt/ssd      ext4 errors=remount-ro,auto,exec,rw,user 0

And bang my head against the wall!!!

It would appear that the exec option needs to be after the user option on the line in fstab or the user option overrides it with noexec. In fact, recommended is at the end of the line.

All working fine now.

Hi,
I have the same problem and tried your suggestion. I opened the terminal on unraid, then cd /etc and after that nano fstab… Here I added the exec option to my hard drive and saved it.

 GNU nano 5.3                                                                                fstab                                                                                          
/dev/disk/by-label/UNRAID  /boot         vfat      auto,rw,flush,noatime,nodiratime,dmask=77,fmask=177,shortname=mixed,exec  0  1
/boot/bzmodules            /lib/modules  squashfs  ro,defaults  0  2
/boot/bzfirmware           /lib/firmware squashfs  ro,defaults  0  2
tmpfs                      /dev/shm      tmpfs     defaults     0  0
hugetlbfs                  /hugetlbfs    hugetlbfs defaults     0  0

But the problem stayed there. After the restart of Unraid the fstab seems to get reset

 GNU nano 5.3                                                                                fstab                                                                                          
/dev/disk/by-label/UNRAID  /boot         vfat      auto,rw,flush,noatime,nodiratime,dmask=77,fmask=177,shortname=mixed  0  1
/boot/bzmodules            /lib/modules  squashfs  ro,defaults  0  2
/boot/bzfirmware           /lib/firmware squashfs  ro,defaults  0  2
tmpfs                      /dev/shm      tmpfs     defaults     0  0
hugetlbfs                  /hugetlbfs    hugetlbfs defaults     0  0

What I am doing wrong?

Thanks!

Having the exact same issue. by no means a programmer here. any help with full basic steps to fix this would be appreciated. even on the esphome discord chat they can not help me all they say is try reinstalling it.

I`m running esphome as the homeassistant user (ubuntu install venv) and need to chown the

chown homeassistant:homeassistant -R /home/raymon/rootfs/home/homeassistant/.homeassistant/esphome/

and clean the build files to get it working