Re: [squid-users] How to run squid with root capability?

From: L.TK <squidmailist@dont-contact.us>
Date: Mon, 11 Dec 2006 22:37:29 +0800

zulkarnain 写道:
> --- Henrik Nordstrom <henrik@henriknordstrom.net>
> wrote:
>
>
>> You should not. cache_effective_user should not be
>> root, not even while
>> using tproxy. But Squid needs to be started as root
>> when unsing tproxy.
>>
>>
>
> How to started squid as root?
>
> regards,
> Zul
>
>
>
> ____________________________________________________________________________________
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail beta.
> http://new.mail.yahoo.com
>
>
>
comment these lines below in src/main.c
if (geteuid() == 0) {
debug(0, 0) ("Squid is not safe to run as root! If you must\n");
debug(0, 0) ("start Squid as root, then you must configure\n");
debug(0, 0) ("it to run as a non-priveledged user with the\n");
debug(0, 0) ("'cache_effective_user' option in the config file.\n");
fatal("Don't run Squid as root, set 'cache_effective_user'!");
}

recompile squid and there you go
Received on Mon Dec 11 2006 - 07:38:03 MST

This archive was generated by hypermail pre-2.1.9 : Mon Jan 01 2007 - 12:00:01 MST