• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

The Squid Service in Failed State with Error: “Failed to make swap directory /var/spool/squid/00: (13) Permission denied”

by admin

The Problem

The squid service in failed state with below error:

# systemctl status squid.service
● squid.service - Squid caching proxy
  Loaded: loaded (/usr/lib/systemd/system/squid.service; enabled; vendor preset: disabled)
  Active: failed (Result: exit-code) since Wed 2019-05-01 16:34:19 GMT; 2min 50s ago
  Process: 2022 ExecStartPre=/usr/libexec/squid/cache_swap.sh (code=exited, status=1/FAILURE)

May 01 16:34:19 [hostname] systemd[1]: Starting Squid caching proxy...
May 01 16:34:19 [hostname] squid[2027]: Failed to make swap directory /var/spool/squid/00: (13) Permission denied   >>
May 01 16:34:19 [hostname] cache_swap.sh[2022]: init_cache_dir /var/spool/squid...
May 01 16:34:19 [hostname] systemd[1]: squid.service: control process exited, code=exited status=1
May 01 16:34:19 [hostname] systemd[1]: Failed to start Squid caching proxy.
May 01 16:34:19 [hostname] systemd[1]: Unit squid.service entered failed state.
May 01 16:34:19 [hostname] systemd[1]: squid.service failed.

The Solution

The permission of /var/spool/squid/ was incorrect.

# ls -ld /var/spool/squid
drwxr-xr-x 2 root root 6 Apr 26 20:29 /var/spool/squid

1. Modify the ownership of the directory from root to squid with below command:

# chown squid:squid /var/spool/squid

2. Verify the permission of the directory with below command:

# ls -ld /var/spool/squid
drwxr-xr-x 2 squid squid 6 Apr 26 20:29 /var/spool/squid

3. Start the squid service with below command:

# systemctl start squid

4. Verify the status of the squid service with below command:

# systemctl status squid

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. CentOS / RHEL 5,6 : How to Change the timezone
  2. How to gzip all or specific files in Linux
  3. grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.
  4. Configure Persistent NIC Names of Network Adaptors in CentOS/RHEL using udev Rules
  5. How To Change Timezone for Oracle Grid Infrastructure
  6. ps Command Examples in Linux
  7. Beginners Guide to NFS in CentOS / RHEL
  8. mdadm Command Shows State : active, degraded
  9. lvsd Command Examples in Linux
  10. How to find which rpm package provides a specific file or library in RHEL / CentOS

You May Also Like

Primary Sidebar

Recent Posts

  • vgextend Command Examples in Linux
  • setpci command – configure PCI device
  • db_load command – generate db database
  • bsdtar command – Read and write tape archive files

© 2022 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright