OpenEPaperLink / Home_Assistant_Integration

Home assistant Integration for the OpenEPaperLink project
Apache License 2.0
137 stars 32 forks source link

Integration attempts to write to root directory #51

Closed psfales closed 9 months ago

psfales commented 9 months ago

After the latest git pull, my scripts stopped working. It turns out that the integration was attempting to create the file "/lastapinteraction.txt" which was failing because the homeassistant user is not allowed to write to /

Steps to reproduce the behavior:

  1. Make sure / is not writable by normal users like home assistant (mode 755)
  2. Remove /lastapinteraction.txt (if it exists, to simulate what happens for a new user)
  3. Invoke a service using drawcustom
  4. Script fails and errors are reported to the log about being unable to open "lastapinteraction.txt"

    As a general rule, applications should not be putting files in /

Once the file is created and made writable, the problem does not show up. My workaround for now is:

# touch /lastapinteraction.txt
# chown homeassistant:homeassistant  /lastapinteraction.txt

It's possible that this is a configuration or installation error on my part, and maybe there is some other way to fix or work around the problem.

jonasniesner commented 9 months ago

thank you for informing me, this will be fixed on the next release this evening