# Sqlite plugin - permission denied

**URL:** <https://community.grafana.com/t/sqlite-plugin-permission-denied/55823>\
**Category:** Configuration\
**Created:** [November 3, 2021, 9:52pm UTC](https://community.grafana.com/t/sqlite-plugin-permission-denied/55823 "2021-11-03T21:52:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![prussell](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@prussell](https://community.grafana.com/u/prussell)\
**Post date:** [November 3, 2021, 9:52pm UTC](https://community.grafana.com/t/sqlite-plugin-permission-denied/55823/1 "2021-11-03T21:52:33Z")

</div>

using the sqlite plugin, latest version (2.1.1) on grafana (8.2.2), running on raspberry pi 3B (Linux raspberrypi 5.10.63-v7+ #1459 SMP Wed Oct 6 16:41:10 BST 2021 armv7l GNU/Linux)

when configuring the data source, the plugin responds (save and test) with **error checking existence: stat /home/pi/redirect/sqlite3/redirect.db: permission denied**

both of us (2 users having the same problem) have checked and rechecked the permissions. All tests have been published [here](https://github.com/fr-ser/grafana-sqlite-datasource/issues/73) (plugin issues on GitHub).

several tests have been performed, in order to identify the problem, no luck.  
The problem occurs when having the database located in /home/pi/redirect/sqlite3/  
When the database is copied to another location (for example /etc/pihole/), the problem does not occur.

Anybody had a permissions problem like this (and hopefully a solution - not implying to move the database to another location, e.g. workarround)?

---

<div class="post-metadata">

**Author:** ![prussell](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@prussell](https://community.grafana.com/u/prussell)\
**Post date:** [November 5, 2021, 8:07am UTC](https://community.grafana.com/t/sqlite-plugin-permission-denied/55823/2 "2021-11-05T08:07:35Z")

</div>

**seriouslly dirty workaround** (probably not appriciated by the linux admin):

mkdir -p /grafana  
mkdir -p /grafana/redirect  
sudo mount -r --bind /home/pi/redirect/sqlite3 /grafana/redirect

define data source as /grafana/redirect/redirect.db → works

fstab entry:  
`/home/pi/redirect/sqlite3 /grafana/redirect none bind 0 0`

does the plugin and / or grafana has a problem with anything in /home?

---

<div class="post-metadata">

**Author:** ![vilkoivshchi](https://avatars.discourse-cdn.com/v4/letter/v/c77e96/32.png) [@vilkoivshchi](https://community.grafana.com/u/vilkoivshchi)\
**Post date:** [March 14, 2022, 7:05pm UTC](https://community.grafana.com/t/sqlite-plugin-permission-denied/55823/4 "2022-03-14T19:05:26Z")

</div>

Hi there!

In documentation for Sqlite plugin defined this trouble.

```auto
# edit (override) the grafana systemd configuration
systemctl edit grafana-server
add the following lines
[Service]
ProtectHome=false
reload the systemd config and restart the app

systemctl daemon-reload
systemctl restart grafana-server

```

It’s work for me.

---

<div class="post-metadata">

**Author:** ![frser](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/frser/32/13170_2.png) [@frser](https://community.grafana.com/u/frser)\
**Post date:** [March 16, 2022, 5:41pm UTC](https://community.grafana.com/t/sqlite-plugin-permission-denied/55823/5 "2022-03-16T17:41:56Z")

</div>

Sorry the initial post had a wrong link. More details can be found in this thread: [Failed to start - plugin folder permission denied - #3 by frser](https://community.grafana.com/t/failed-to-start-plugin-folder-permission-denied/54647/3)
