ubuntu – Squid proxy server error: at startup

I had this error when starting Squid Proxy Server with the help of the command sudo squid -z

fatal: ipc :: mem :: segment :: create failed to shm_open (/squid-cf__metadata.shm): 13 permission denied

How will I fix it? I'm using version 3.5.26 of Squid. I have tried all the patches found on the web, but nothing works.

I have tried to implement the fix below found on the web:

Just add the following line to your / etc / fstab file:
shm / dev / shm tmpfs Nodev, nosuid, noexec 0 0
After this use (as root):
# mount shm 

Unfortunately, it does not work. Another possible solution on the Web is the errid reading of squid.pid.

squid: ERROR: can not read pid file
/var/run/squid.pid: (13) Permission denied

Unfortunately, while I was looking in my repertoire, I could not find squid.pid.

How will I operate my squid? Thank you.