Why Squid Cannot Open Its Log File
Inspect every path component, then distinguish traversal, existing-file append and new-file creation before widening access.
access_log stdio:/srv/squid-logs/access.log logformat=squidFor that illustrative Squid 6 stdio logger, inspect the path read-only:
namei -l /srv/squid-logs/access.log| Operation | Required access |
|---|---|
| Traverse parent path | Search/execute on each directory |
| Append existing log | Traversal plus file write access |
| Create missing log | Also write permission in immediate parent |
Compare modes and ACLs with the actual writer. Stdio writes through Squid; daemon logging uses a helper. Rotation's rename/replacement can require other directory access.
Repair the component responsible for the denial. Write permission on every ancestor is unnecessary merely for traversal. If ordinary permissions suffice, inspect service security-policy denial instead of recursively widening the installation/cache tree.