Click to See Complete Forum and Search --> : Squid 2.4 STABLE7 problem!
yenonn
03-17-2003, 11:12 PM
Dear all,
i just installed squid 2.4 STABLE7 from the RH8.0 installation CD (install thru rpm). After all, i went thru some documentations on squid and noticed that the squid should have a directory called /usr/local/squid. it is so weird that squid 2.4 doesn't has this directory. so, i am now quite confusing, please help! i need explaination on this. Why? and then, how am i going to handle this.... do i need to uninstall and reinstall a new version of squid? please notify! thanks
Cheers,
yenonn
yenonn
03-18-2003, 03:24 AM
now, i uninstalled squid2.4 STABLE7 and reinstall squid 2.5 STABLE2. then, i set the squid.conf file as the Quickstart file, which provided by the squid 2.5 installation file.
but, however i still cannot make the thing works.
i have this error shown in the terminal
2003/03/18 15:04:11| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/var/cache/00: (13) Permission denied
Squid Cache (Version 2.5.STABLE2): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 7
what is the exact error? please notify! thanks
Magueta
03-18-2003, 10:37 AM
When you ran the installation, were you logged in as root?
Joe
yenonn
03-18-2003, 08:01 PM
yes! i log in as root... then, how to handle this?
Magueta
03-18-2003, 08:29 PM
This problem exists because the effective user that Squid runs as doesn't have permissions to enter the /usr/local/squid directory so it can't create the spool file that it needs. There are a couple ways that you can check, the first is to use "ls -ld /usr/local/squid" and down the path from there to see who owns the directories. If they're owned by root you'll probably want to chang them. The next way is to su to user squid, then go to /usr/local/squid and try creating a file, then try it in the next directory down. This presumes that your version of squid runs as user squid, if it doesn't you'll have to su to that user instead to use this experiment.
Let me know how it goes.
Joe
yenonn
03-18-2003, 09:45 PM
ok, i have checked /usr/local/squid. it is belong to root. then, i go to change the effective user to squid.
# chown squid:squid /usr/local/squid/. *
then, i su it to squid user. but,the system won't allow me to su to squid. then, i try to create a user called squid, then, the system prompts that squid user is exists. ok! fine, then, i go to the "user and group" and look for squid user. yes, it is in the list. i think it is a bit strange for me. how should i continue next?
here, i just want to make a clear concept here. do i need to log in as squid in order to run squid? why not root? since root has permission to write to the file. and why? is it because of the security problem?
thanks!
yenonn
03-18-2003, 10:01 PM
su squid will give me
su: cannot run /dev/null: Permission denied
Magueta
03-18-2003, 11:16 PM
You can start Squid as root but Squid itself runs as a different user, I believe it's for security purposes. If Squid ever becomes compromised by a hacker, the hacker won't have root access they'll only have as much access as the "Squid" user. I'm not sure but I believe you may be unable to login as the squid user because that user wouldn't have a home directory or a default shell, rather from the output it seems that the default shell for the squid user is /dev/null. I'm on unsure ground here but you can either change ownership of the squid directory to "squid" or you can simply change the permissions of the directory so that anyone can access the directory, however, if that's a directory with configuration files and log files etc, the second option probably isn't a good idea because if anyone can write to it then anyone can delete any of the files in the directory. Try just changing ownership of the file to the "squid" user.
Joe
yenonn
03-19-2003, 12:10 AM
Dear Magueta,
now, i think i have get thru the problem, but, it seems another problem is come after this.
i started squid as usual, then, i use my browser to divert to www.google.com, but, the result coming out is something like
Access denied
Access Control Configuration prevent your request form being allowed at this time.
by this, i am suspecting the acl list is having problem. i will show u my acl list configuration later on.
here, i have another question, does squid prompt the user to authenticate their id?
thanks
cheers,
yenonn
Magueta
03-19-2003, 12:21 AM
Sorry Yennon, but I'm not an expert on Squid, I just knew how to deal with the problem that you were having. I have no idea what an acl list is. (access control list ?) However, the error message suggests that it's a configuration problem, so maybe you should go over a squid how-to or perhaps an FAQ to see if that message shows up anywhere. One thing that often works for me is taking the exact error message (cut and paste) and putting it into google, first on the web and then in the newsgroups.
I'd love to help you further Yennon but, like I said I don't know anything else about Squid.
Joe
yenonn
03-19-2003, 01:47 AM
nevermind, thanks for ur help, magueta...i really appreciate ur help