Closed ttrushin closed 8 years ago
For now I seem to have resolved the issue by manually changing the permissions of the HA log and database files to "-rw-rw-rw-". Still, I'm sure I can't be the only person with this issue.
Sorry, I don't know PM2 but I have seen similar issues while creating the systemd service unit. The problem was that HA was launched with a different user while running with --config %h/.homeassistant/
(%h
pointed to the other user's directory).
Just quickly checking the documentation.
As indicated by @fabaff. See to that the HA instance is run with the proper usage.
Example:
pm2 startup hass -u homeassistant2
@tySwift93 Closing this. Reopen it if the suggestion @Landrash made doesn't work.
Make sure you run the latest version before reporting an issue. Feature requests should go in the forum: https://community.home-assistant.io/c/feature-requests
Home Assistant release (
hass --version
): 0.19.2Python release (
python3 --version
): 3.5.1Component/platform: Recorder(?)/Database(?)
Description of problem: I use PM2 to run a bunch of different things, including HA. Whenever I need to restart HA (always using PM2), it no longer has any 'write' access at all to the HA database. I can "fix" the issue by deleting the database manually and letting a new one be created, but this is obviously removes all of my history and states. When I start HA manually (not through PM2), it can read and write from/to the database without any problems.
Is HA creating a database with specific permissions that don't "carry over" with each restart? Am I doing something wrong here?