I want to run may instances of squid proxies. But I am only able to connect with them when squid is started with sudo. In the squid config I have:

access_log none
cache_store_log none
cache_log /dev/null
$ squid -n squida -f /tmp/squid_80fm8klt.conf                                                                                                              
$ curl --proxy http://localhost:3129  https://httpbin.org/ip                                                                                                   
curl: (7) Failed to connect to localhost port 3129: Connection refused
$ sudo squid -n squida -f /tmp/squid_80fm8klt.conf                                                                                                         
WARNING: Cannot write log file: none
none: Permission denied
         messages will be sent to 'stderr'.
$ curl --proxy http://localhost:3129  https://httpbin.org/ip                                                                                                     
  "origin": "92.119.18.XX"

I'm on a Fedora 32 system.

Full config:

http_access allow all

coredump_dir /var/spool/squid3

refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern .       0   20% 4320

access_log none
cache_store_log none
cache_log /dev/null

never_direct allow all
cache_peer zzz.nordvpn.com parent 89 3130 tls login=xXx:yYy
http_port 3129

  • It looks like it's trying to write a file called "none". Have you read man -k squid? What port are you using? Ports under 1000 are privileged.
    – waltinator
    Commented Jul 27, 2021 at 0:45
  • The description of cache_log doesn't show none as a supported value (compare with access_log, which does).
    – muru
    Commented Jul 27, 2021 at 0:46
  • @waltinator The local port which squid listens to is 3129. Squid itself listens/forwards to another upstream proxy on port 89. Sending logs to none is from here: wiki.squid-cache.org/SquidFaq/…
    – tsorn
    Commented Jul 27, 2021 at 0:48
  • @muru I have changed it to /dev/null as per the wiki and I still have the same issue
    – tsorn
    Commented Jul 27, 2021 at 0:50
  • Using squid 4.15 on Arch Linux, I don't get your error about none. However, squid run as my user does fail, but debug logging showed that that was because it could not write to the PID file. Run squid -n squida -f /tmp/squid_80fm8klt.conf -N -d 1 to see what your squid is failing over.
    – muru
    Commented Jul 27, 2021 at 1:19

1 Answer 1


As mentioned by @muru, running squid with squid -N -d 1 reveals that

2021/07/27 03:20:12| FATAL: failed to open /run/squid.pid: (13) Permission denied
    exception location: File.cc(190) open

The solution is to place the pidfile in another directory, or to avoid creating it, as per http://www.squid-cache.org/Doc/config/pid_filename/ place this in the config:

pid_filename none

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .