Time for action – fixing cache directory permissions

We can fix this issue by creating the cache directory and then transferring the ownership to the Squid user manually.

mkdir /opt/squid/var/cache
chown nobody:nobody /opt/squid/var/cache

The previous commands will create the cache directory and will transfer the ownership to the Squid user.

If we try to create the swap directories now, the command will succeed and will output something like this:

[root@saini etc]# /opt/squid/sbin/squid -z
2010/11/10 00:44:16| Creating Swap Directories
2010/11/10 00:44:16| /opt/squid/var/cache exists
2010/11/10 00:44:16| Making directories in /opt/squid/var/cache/00
2010/11/10 00:44:16| Making directories in /opt/squid/var/cache/01
...

What just happened?

We learned ...

Get Squid Proxy Server 3.1 Beginner's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.