Error installing plugin in grafana Google-sheet

I’m trying to install the google-sheets plugin in grafana but I get an error. See the error that appears in the logs:

logger=context userId=1 orgId=1 uname=admin t=2023-01-23T16:39:55.313741741-03:00 level=error msg="Failed to install plugin" error="failed to extract plugin archive: could not create \"/var/lib/grafana/plugins/grafana-googlesheets-datasource\", permission denied, make sure you have write access to plugin dir" remote_addr= traceID=
logger=context userId=1 orgId=1 uname=admin t=2023-01-23T16:39:55.315257709-03:00 level=error msg="Request Completed" method=POST path=/api/plugins/grafana-googlesheets-datasource/install status=500 remote_addr= time_ms=786 duration=786.270555ms size=51 referer= handler=/api/plugins/:pluginId/install

What should I do to complete the installation?

Hi @secomti4monitor,

Welcome to the :grafana: community support forums !!

We are excited that you joined our OSS community. Please read about some of the FAQs in the community :slight_smile:

Looking at the logs, it says that it does not have permission to write (and also create) to the directory /var/lib/grafana

Try to log in to the server using the root user on the server and then use the command line option, so that the plugin can be installed correctly.

Here is the link to the Installation guide.

Let us know if this helps.