I'm following this tutorial exactly line by line: https://docs.meilisearch.com/learn/cookbooks/running_production.html#step-4-run-meilisearch-as-a-service
It has a step to setup the Meilisearch as a service using this config:
cat << EOF > /etc/systemd/system/meilisearch.service
[Unit]
Description=Meilisearch
After=systemd-user-sessions.service
[Service]
Type=simple
WorkingDirectory=/var/lib/meilisearch
ExecStart=/usr/local/bin/meilisearch --config-file-path /etc/meilisearch.toml
User=meilisearch
Group=meilisearch
[Install]
WantedBy=multi-user.target
EOF
However when I run it as suggested I get this error:
systemd[1]: Started Meilisearch.
systemd[2834]: meilisearch.service: Failed to execute command: Permission denied
systemd[2834]: meilisearch.service: Failed at step EXEC spawning /usr/local/bin/meilise
systemd[1]: meilisearch.service: Main process exited, code=exited, status=203/EXEC
systemd[1]: meilisearch.service: Failed with result 'exit-code'.
However when I run the command specified in the service config it works perfectly:
/usr/local/bin/meilisearch --config-file-path /etc/meilisearch.toml
This is on Debian 10 and Debian 11.