Failed to start - plugin folder permission denied

Attempting a fresh installation of Grafana on my new machine and ran into an issue while configuring my custom plugins folder.

Failed to start grafana. error: stat /home/asw-user/plugins: permission denied

Issue
Grafana service is able to start when I don’t modify plugin folder location, but when I change it to a custom directory the service fails to start…

Followed all the steps in docs, but am not sure what permission issue I have

Log Output (/var/log/syslog)

Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="Path Logs" logger=settings path=/var/log/grafana
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="Path Plugins" logger=settings path=/home/asw-user/plugins
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="Path Provisioning" logger=settings path=/etc/grafana/provisioning
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="App mode development" logger=settings
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="Connecting to DB" logger=sqlstore dbtype=sqlite3
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="Starting DB migrations" logger=migrator
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="migrations completed" logger=migrator performed=0 skipped=346 duration=422.573µs
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="Starting plugin search" logger=plugins
Oct 12 11:47:30 asw grafana-server[5758]: t=2021-10-12T11:47:30-0500 lvl=info msg="Registering plugin" logger=plugins id=input
Oct 12 11:47:30 asw grafana-server[5758]: Failed to start grafana. error: stat /home/asw-user/plugins: permission denied
Oct 12 11:47:30 asw grafana-server[5758]: stat /home/asw-user/plugins: permission denied
Oct 12 11:47:30 asw systemd[1]: grafana-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 12 11:47:30 asw systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Oct 12 11:47:30 asw systemd[1]: grafana-server.service: Scheduled restart job, restart counter is at 5.
Oct 12 11:47:30 asw systemd[1]: Stopped Grafana instance.
Oct 12 11:47:30 asw systemd[1]: grafana-server.service: Start request repeated too quickly.
Oct 12 11:47:30 asw systemd[1]: grafana-server.service: Failed with result 'exit-code'.
Oct 12 11:47:30 asw systemd[1]: Failed to start Grafana instance.

Version: v8.2.1

Hi,

If you change the default config to custom config, you need to modify the permission for the access of the folder.
I suggest you run this:

chown -R grafana:grafana /home/asw-user/plugins

Regards,
Fadjar Tandabawana

Grafana changed their installation settings in v8.2.0 (see link: Packaging: Add stricter systemd unit options by erdnaxe · Pull Request #38109 · grafana/grafana · GitHub). The “/home” directory is protected now and can’t be used unless you change some systemd settings

Some more information on how to mitigate this can be found here: GitHub - fr-ser/grafana-sqlite-datasource: Grafana Plugin to enable SQLite as a Datasource