Open eximo84 opened 2 years ago
I have had similar issue past 5 days (from december 17) and haven't found solution yet.. I have tried re installing, updating and upgrading pretty much everything related to esphome and platformio with no change.. I'm running esphome with debian if that information helps for finding solutions
It's a cache folder issue, explained here: https://github.com/esphome/issues/issues/2594#issuecomment-949419636
@coax Thanks! I've got my permissions problem fixed by adding the 'exec' option to the /etc/fstab entry for the drive that has the docker mount point on.
@coax Thanks! I've got my permissions problem fixed by adding the 'exec' option to the /etc/fstab entry for the drive that has the docker mount point on.
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. Did I something wrong? (Unraid 6.9.2, ESPHome, 2022.02.06 in a docker)
Thanks!
/boot
is not the right filesystem. Also, your root filesystem, whatever it is, will already have execute permission or nothing would work at all. You need to find out where your container /config
points to or add a mapping to the container for /cache
that points to local storage.
@ssieb: My /config points to /mnt/user/appdata/ESPHome. What do I have to do in order to fix the problem?
Thanks!
@u20p17 Your folder should have execution permission for the user which owns the ESPHome process (docker container in your case)
In my case the problem was in the mount attributes (I had noexec
specified)
If that is not your case you should fix the specific folder permissions.
Use ls -ld /mnt/user/appdata/ESPHome
to check the permissions on the folder.
Use ps aux | grep esphome
to see the owner of the process.
Adjust either the permissions with chown
, chmod
, or the process owner by specifying the --user attribute for the docker command.
@horodchukanton : I did the first two steps you wrote and this is the result:
The user who should get permissions is called u20p17 - how would the command look like in this case? Thank you in advance!
@u20p17 I'm sorry, but the commands were wrong )
The ls
should have -ld
to show permissions on the folder itself and the ps
should have uax
to show the owner of the process (already updated the commands in previous message).
To make u20p17
owner of the folder, simply call the
chown -R u20p17:root /mnt/user/appdata/ESPHome
Also, you probably have the execution bit missing according to the file permissions. You can add it with
chmod u+x /mnt/user/appdata/ESPHome
@horodchukanton : I now tried the updated commands, but to be honest I can not see who is the ower of the folder...
I didn't try to make u20p17 the owner, because I do not want to destroy anything :P
@u20p17 Can you show the mount options?
mount | grep /mnt/user
@horodchukanton
@u20p17 You should add the exec
mount option
@horodchukanton : I put chmod u+x /mnt/user/appdata/ESPHome
in the cmd and after that restartet unraid completely - same issue with esphome :(
@u20p17 That's not what I meant. You're mounting the remote share without the exec
option, and as the result the local OS does not allow you to execute files.
You should add the ,exec
option to your /etc/fstab
line
@horodchukanton: if I open the etc/fstab I see the following:
What would I need to add there? Thanks again!
@u20p17 Please refer to the SSHFS documentation on how to specify the permanent mount
@horodchukanton: I now tried to add the mount to the/etc/fstab. I added the following:
UUID=301d42ac-f4eb-4e55-8792-9ad57d1ef60f /mnt/user/appdata/ESPHome xfs defaults,exec 0 0
After saving the fstab I worte mount --all
in the cmd and after that I tried to compile again with ESPHome... But the permission error is still there - why?
@u20p17 Im sorry, but I am not able to help you with mounts, as I know too little about your configuration. Please look for help in specific Linux community.
I think I fixed the issue now. It's a bit strange, but what I did is the following:
1.) ls -ld /mnt/user/appdata/ESPHome
Output: drwxrwxrwx 1 nobody users 90 Mar 3 2022 /mnt/user/appdata/ESPHome/
So it seemed that the every user/group should have read/write/execute rights on this folder. Nevertheless I did the following:
2.) chmod -R 777 /mnt/user/appdata/ESPHome
I recursive changed the rights for all users/groups to read/wrtie/execute and now it is working again... Strange - but maybe it helps other people...
/mnt/user/appdata/ESPHome points to the /config folder of ESPHome...
The problem
updating my ESP devices, now get Permission Denied after compile. Reading appears to be an issue with execute permissions on the file system? I mapped a new folder inside my SMB shared folder where the current configuration exists called "/cache" and gave all files and folders 777 permissions however still getting errors.
Which version of ESPHome has the issue?
2021.12.0
What type of installation are you using?
Docker
Which version of Home Assistant has the issue?
2021.11.4
What platform are you using?
ESP32
Board
nodemcu
Component causing the issue
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
No response