I can't run Traccar as unprivileged non-root user

IoSonoPiero6 years ago

Hello people,
finally my Traccar installation is working very good.
Now, I've decided to secure it and, following the documentation, I'm trying to Traccar run as non-root.
So, logged on my shell, I did:

sudo adduser traccar

I add my nice password, then

sudo mkdir /etc/systemd/system/traccar.service.d/
sudo touch /etc/systemd/system/traccar.service.d/run-as-user.conf

then I've added

 [ Service]
 User =traccar
 Group =traccar

into 'run-as-user.conf file'.

Now, because I'm a beginner with Linux,
I don't know how make /opt/trraccar to be readable and writable by 'traccar' user.

Current owner group is 'root':

drwxr-xr-x 10 root root 4096 mar 13 23:57 traccar

Someone can help me, please?
What commands I have to give to my shell to secure my installation?

Thanks,
Piero