Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 496452 - net-proxy/squid with workers=2 wants access to /var/run/squid or /run/squid for coordinator.ipc kid-N.ipc
Summary: net-proxy/squid with workers=2 wants access to /var/run/squid or /run/squid f...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal with 1 vote (vote)
Assignee: Eray Aslan
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-30 00:36 UTC by Gleb
Modified: 2014-01-23 11:27 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge-info.txt,5.24 KB, text/plain)
2013-12-30 00:37 UTC, Gleb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gleb 2013-12-30 00:36:23 UTC
When I set workers=2, squid need access to /var/run/squid dir with write permissions. It holds coordinator.ipc  kid-1.ipc  kid-2.ipc files there.
But this folder disapear on reboot.
Maybe we need to create it in squid start.

Reproducible: Always

Steps to Reproduce:
1.install squid 3.3
2.set workers=2
3.start squid
-- read /var/log/messages (there will be some errors of squid)
4.create folder /var/run/squid/
5.set owner #chown squid:squid /var/run/squid
6. restart squid 
-- squid is ok.
7.reboot
Actual Results:  
No folder /var/run/squid/

Expected Results:  
folder /var/run/squid/ with write permissions for squid user

[I] net-proxy/squid  Installed versions:  3.3.11(01:46:38 30.12.2013)
(caps ecap ipv6 ldap logrotate mysql pam postgres qos samba sasl snmp ssl -icap-client -ipf-transparent -kerberos -kqueue -nis -pf-transparent -radius -selinux -sqlite -ssl-crtd -test -tproxy ELIBC="-uclibc" KERNEL="linux")
Comment 1 Gleb 2013-12-30 00:37:44 UTC
Created attachment 366512 [details]
emerge --info
Comment 2 Jeroen Roovers (RETIRED) gentoo-dev 2013-12-30 01:16:50 UTC
That's odd.

~/portage/net-proxy/squid-3.3.11/work/squid-3.3.11 # fgrep -r DEFAULT_STATEDIR .
./src/ipc/Makefile.am:DEFS += -DDEFAULT_STATEDIR=\"/run/squid\"
./src/ipc/Makefile.in:DEFS = @DEFS@ -DDEFAULT_STATEDIR=\"/run/squid\"
./src/ipc/mem/Segment.cc:const char *Ipc::Mem::Segment::BasePath = DEFAULT_STATEDIR;
./src/ipc/Port.cc:const char Ipc::coordinatorAddr[] = DEFAULT_STATEDIR "/coordinator.ipc";
./src/ipc/Port.cc:const char Ipc::strandAddrPfx[] = DEFAULT_STATEDIR "/kid";
Comment 3 Gleb 2013-12-30 08:55:39 UTC
(In reply to Jeroen Roovers from comment #2)
> That's odd.

Do you need some additional info?
I try to look in my src when emerging.

# cd /var/tmp/portage/net-proxy/squid-3.3.11/work/squid-3.3.11/
fgrep -r DEFAULT_STATEDIR

Output was like yours, but I had one more line:
src/ipc/Makefile:DEFS = -DHAVE_CONFIG_H -DDEFAULT_STATEDIR=\"/run/squid\"
Comment 4 Gleb 2013-12-30 09:06:13 UTC
Ok, firstly it looks like variable DEFAULT_STATEDIR is not set.
# env| grep  DEFAULT_STATEDIR has no output.
When I run  DEFAULT_STATEDIR=\"/run/squid\" rc-service squid restart
it creates /var/run/squid and /run/squid folders. But they belongs to root user and can`t be written by user squid.
Comment 5 Gleb 2013-12-30 09:19:51 UTC
And squid maybe needs access not to /var/run/squid/ but to /run/squid/, because /var/run/ is a symlink to /run and I cant detect where squid go.
Comment 6 Eray Aslan gentoo-dev 2014-01-18 22:17:25 UTC
Should be fixed in net-proxy/squid-3.4.2.  Please let me know if you still have a problem.
Comment 7 Gleb 2014-01-23 11:27:17 UTC
(In reply to Eray Aslan from comment #6)
> Should be fixed in net-proxy/squid-3.4.2.  Please let me know if you still
> have a problem.

Yes, it works fine. Thank you!