Bug #4885
closedsquid3 chmod error at boot after reinstall post-upgrade
0%
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
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
Updated by Bipin Chandra over 9 years ago
im having same issue, setting to 0666 works fine
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
Updated by José de Paula Rodrigues Assis about 9 years ago
- File squid.inc.diff squid.inc.diff added
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.
Updated by Kill Bill about 9 years ago
Updated by Chris Buechler almost 9 years ago
- Status changed from Feedback to Resolved