Project

General

Profile

Actions

Bug #4885

closed

squid3 chmod error at boot after reinstall post-upgrade

Added by Dave B over 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Squid
Target version:
-
Start date:
07/27/2015
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Affected Version:
Affected Plus Version:
Affected Architecture:

Description

when squid3 start
warning: chmod() expects parameter 2 to be long, string given in /usr/local/pkg/squid.inc on line 156
line 156 in squid.inc is: chmod("/var/squid/cache/swap.state", "a+rw");

moving a+rw to 666 seems to have fixed this one (at least I have no errors on the screen at package start)


Files

squid.inc.diff (456 Bytes) squid.inc.diff José de Paula Rodrigues Assis, 08/24/2015 02:52 PM
Actions #1

Updated by Chris Buechler over 9 years ago

  • Subject changed from squid3 error at boot after upgrade from 2.2.3 to 2.2.4 to squid3 chmod error at boot after reinstall post-upgrade
  • Target version deleted (2.2.4)
  • Affected Version deleted (2.2.4)

no relation to base version

Actions #2

Updated by Bipin Chandra over 9 years ago

im having same issue, setting to 0666 works fine

Actions #3

Updated by Dave B over 9 years ago

2015/07/31 03:05:08 kid1| /var/run/squid/squid.pid: (1) Operation not permitted
2015/07/31 03:05:08 kid1| WARNING: Could not write pid file

Actions #4

Updated by José de Paula Rodrigues Assis over 9 years ago

Squid3 on pfsense 2.1.5 used the command:

exec("chmod a+rw /var/squid/cache/swap.state");

on squid.inc.php. The version on pfsense 2.2.4, on the other hand, uses the syntax

chmod("/var/squid/cache/swap.state", "a+rw");

However, PHP's chmod doesn't accept literal modes as a chmod argument, only octal ones (look at http://php.net/chmod). The argument as it is causes PHP to emit an error message wherever it tries to call this function, also affecting Squid's XMLRPC syncing between two hosts. Simply changing the function call to use the correct argument type makes the errors go away:

chmod("/var/squid/cache/swap.state", 0666);

is correct (notice the leading 0, it is important). Attached is a simple patch against squid.inc that does that.

Actions #6

Updated by Renato Botelho over 9 years ago

  • Status changed from New to Feedback

Merged

Actions #7

Updated by Kill Bill about 9 years ago

Fixed.

Actions #8

Updated by Chris Buechler almost 9 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF