[squid-users] logfileHandleWrite: daemon:/var/logs/access.log: error writing ((32) Broken pipe)

Amos Jeffries squid3 at treenet.co.nz
Fri Feb 13 21:18:27 UTC 2015


On 14/02/2015 12:45 a.m., Priya Agarwal wrote:
> root at t4240qds:~# chown -R nobody:nogroup /var/logs


STOP!!!


You are demonstrating in the last few posts that you do not understand
how the command line tools or the permissions work.

Please stop right now from doing anything on your own. This may take a
while to get your system working again, but it is still possible.

If you have anyone who has a lot of experience with the OS you are using
and the command line in particualr please get them to check over the
permissions in your entire /var directory structure.


We can help guide you through what needs to be done for Squid, but only
if you follow the advice exactly as given and not take other steps.



> WARNING: Cannot write log file: /var/logs/cache.log
> /var/logs/cache.log: Permission denied
>          messages will be sent to 'stderr'.
> root at t4240qds:~# ls -ld /var/logs
> drwx------ 2 nobody nogroup 4096 Feb 13 11:49 /var/logs
> 

What that means is that the permissions have gotten all screwed up.

As Anthony mentioned your setting of them on /var/ screwed the entire
operating system from being able to write content in the /var directory
and subdirectories.


The top /var directory is always owned by root and group with full read
and execute permissions.

  chown root:root /var
  chmod 755 /var

  chown root:root /var/logs /var/cache /var/run
  chmod 755 /var/cache
  chmod 775 /var/logs


Your proxy is built with the default username of "squid". So there
should be a system user and group by that name

  addgroup --system squid
  adduser --system --no-create-home \
      --disabled-login --disabled-password \
      --ingroup squid squid

If the add* commands complain about existing user/group that is okay.


then show us the output of:
  ls -la /var
  ls -la /var/logs


> 
> On Fri, Feb 13, 2015 at 5:12 PM, Priya Agarwal wrote:
> 
>> Then It is unable to write cache.log:
>> Here is the output:
>>
>> root at t4240qds:~# /usr/sbin/squid -k parse
>> 2015/02/13 12:27:14| Startup: Initializing Authentication Schemes ...
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'basic'
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'digest'
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'negotiate'
>> 2015/02/13 12:27:14| Startup: Initialized Authentication Scheme 'ntlm'
>> 2015/02/13 12:27:14| Startup: Initialized Authentication.
>> 2015/02/13 12:27:14| Processing Configuration File: /etc/squid.conf (depth
>> 0)
>> 2015/02/13 12:27:14| Processing: cache_mgr priyaiitmandi at gmail.com
>> 2015/02/13 12:27:14| Processing: visible_hostname t4240qds
>> 2015/02/13 12:27:14| Processing: cache_effective_user nobody


There is no need for that directive in your squid.conf file.

Your Squid is explicitly built with username "squid".


Amos


More information about the squid-users mailing list