Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a problem after compiling squid 2.7
when i start it with command "squid " its pid come in list of "ps -e" out put and disappear after seconds and i didnt change any thing on squid.conf
I have this problem with squid 3.1 too
According to your ./config --prefix option, squid binary should be in /usr/sbin/squid, but you're running it from /usr/local/squid/sbin/squid, so are you sure you are not mixing squid installations somehow?
About the logs, they should be under /var/log according to your ./configure script. Also you may check system logs (/var/log/syslog, /var/log/messages)
And you can run squid in debug mode and watch the output:
Aug 1 06:43:14 debian squid[1104]: Cannot open '/var/logs/access.log' for writing.#012#011The parent directory must be writeable by the#012#011user 'nobody', which is the cache_effective_user#012#011set in squid.conf.
this is the output of /usr/sbin/squid -Nd1
Code:
root@debian:/var/log# /usr/sbin/squid -Nd1
WARNING: Cannot write log file: /var/logs/cache.log
/var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.
2009/08/01 06:54:31| Starting Squid Cache version 2.7.STABLE9-20110812 for i686-pc-linux-gnu...
2009/08/01 06:54:31| Process ID 1140
2009/08/01 06:54:31| With 1024 file descriptors available
2009/08/01 06:54:31| Using epoll for the IO loop
2009/08/01 06:54:31| Performing DNS Tests...
2009/08/01 06:54:31| Successful DNS name lookup tests...
2009/08/01 06:54:31| DNS Socket created at 0.0.0.0, port 37160, FD 5
2009/08/01 06:54:31| Adding domain localdomain from /etc/resolv.conf
2009/08/01 06:54:31| Adding domain localdomain from /etc/resolv.conf
2009/08/01 06:54:31| Adding nameserver 172.16.49.2 from /etc/resolv.conf
2009/08/01 06:54:31| logfileOpen: opening log /var/logs/access.log
FATAL: Cannot open '/var/logs/access.log' for writing.
The parent directory must be writeable by the
user 'nobody', which is the cache_effective_user
set in squid.conf.
Squid Cache (Version 2.7.STABLE9-20110812): Terminated abnormally.
CPU Usage: 0.012 seconds = 0.000 user + 0.012 sys
Maximum Resident Size: 9936 KB
Page faults with physical i/o: 0
Aborted
root@debian:/var/log#
i think the problem coming from the user "nobody" according to this line
Code:
parent directory must be writeable by the#012#011user 'nobody', which is the cache_effective_user#012#011set in squid.conf.
[/CODE]
should i change squids user to some user that have much more permission ?
Not necessarily.
If you have created the directory /var/logs for squid logging (different than system's /var/log), you can chown it to nobody
You can add a directory under /var/logs and make that owned by nobody:
i didnt create special log folder for it
but when i see that it says that it cant read "/var/logs/access.log"
i create "access.log" fore it and chmod it to make sure squid can read it after that i start it again it says that it cant open "NAME OF ONOTHER FILE" i created that too but again it says it cant ....
i think squid should run as a user that have enough permition
i put user nobody in group of root but nothing chainge
i put user nobody in group of root but nothing chainge
Don't do it. There is no need of a special user to run squid.
And there is no need to create the log file yourself. Once started squid will create it automatically.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.