Need to change chunks directory from /tmp to /opt in ubuntu 20. Can someone pls help on this

I modified loki config file but its not working. i mean chunks are not created in /opt when i change chunks_directory to /opt/chunks.