Squid failed to make swap directory
09:39 28 Mar 2021

I am currently trying to setup Squid proxy for caching purposes on a server running Ubuntu 20.04 but it fails to start with the following errors:

2021/03/28 15:37:38| Created PID file (/var/run/squid.pid)
2021/03/28 15:37:38 kid1| Set Current Directory to /mnt/Biggy/squid
2021/03/28 15:37:38 kid1| Creating missing swap directories
2021/03/28 15:37:38 kid1| Not currently OK to rewrite swap log.
2021/03/28 15:37:38 kid1| storeDirWriteCleanLogs: Operation aborted.
2021/03/28 15:37:38 kid1| FATAL: Failed to make swap directory /mnt/Biggy/squid: (13) Permission denied
2021/03/28 15:37:38 kid1| Squid Cache (Version 4.10): Terminated abnormally.

The said folder was given correct ownership and permission:

drwxrwxr-x 2 proxy   proxy    4096 Mar 28 14:50 squid

The relevant directives in squid.conf are below:

cache_store_log /mnt/Biggy/squid/store.log
coredump_dir /mnt/Biggy/squid
cache_dir ufs /mnt/Biggy/squid 10000 16 256 

cache_effective_user proxy
cache_effective_group proxy

I checked user, group, permissions, etc all seem correct. There however another important point: if I change cache_effective_user to my own username and take ownership of the folder /mnt/Biggy/squid/ then it works. I would however prefer not to to that.

Does anyone have a suggestion? I don't mind deleting the /mnt/Biggy/squid/ folder if needed but it has to be stored on /mnt/Biggy.

Thank you

caching initialization swap squid