Operating Systems > Linux and UNIX
squid error
Master of Reality:
i installed squid, when i run "squid -z" (to create the swap directorys) it gives me the error:
--- Code: ---
--- End code ---
I never had to set the 'cache_effective_user' on my squid installation before and it will run 'squid start' (but it doesnt work because there is no swap directories) without a dont run as root message. Should i make a user named squid and then set it as the cache_effective_user??
voidmain:
Yes you should run it as user "squid", and you have to create the top level cache directory as root and change ownership of that directory to the squid user so when you do the "squid -z" the squid user has permissions to create the cache directories under that top level cache directory. On my system that directory looks like this:
--- Code: ---
--- End code ---
[ December 06, 2002: Message edited by: void main ]
Master of Reality:
my /var/lib/squid (which is the default cache dir in slackware) is owned by nobody. SO should i still make it to squid and run it as squid isntead of nobody? And when i am making the user squid do i set a password for it?
voidmain:
Sounds like Slackware set squid up to run under the user "nobody". To make it run under the user "squid" you would have to create the "squid" username and it's home directory would be the same as the cache directory, on my system the /etc/passwd entry looks like this:
--- Code: ---
--- End code ---
Notice the login shell is "/dev/null", this insures that no one can log in as that user, however you want to also set the passwd field in /etc/shadow to "!!" like this:
--- Code: ---
--- End code ---
I usually create a user normally and then go change those few things manually with vim but there should be options to the "adduser" or "useradd" command to create them that way from the start. Here's the useradd equivelant that you would want to use:
# adduser -M -d /var/lib/squid -s /dev/null
and then go edit the /etc/shadow and make sure the second field is "!!" (or just type "passwd -l squid" which will do the same thing).
[ December 06, 2002: Message edited by: void main ]
Master of Reality:
when i set the cache_effective_user as squid it gives me the same error message.
Navigation
[0] Message Index
[#] Next page
Go to full version