Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 109902 - net-proxy/dansguardian-2.8.0.6: Error opening/creating log file
Summary: net-proxy/dansguardian-2.8.0.6: Error opening/creating log file
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-20 02:51 UTC by Sachin Sawant
Modified: 2005-12-20 07:39 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sachin Sawant 2005-10-20 02:51:23 UTC
When using dansguardian-2.8.0.6 with gentoo 2005.1 it gives following error, 
--------------
Error opening/creating log file. (check ownership and access rights).
I am running as nobody and I am trying to open /var/log/dansguardian/access.log
--------------
I created the access.log file and change the permission with nobody and change
access rights with 755 but still having same problem. Also I tried to change
login shell for user nobody and login using nobody on console and then try to
run dansguardian it's working. But it is not working through root login nor
through /etc/init.d/dansguardian script.

* But running same ebuild on gentoo version 2005 works fine.


Reproducibility everytime.

Steps to reproduce:

1. emerge ebuild net-proxy/dansguardian-2.8.0.6
2. create access.log file with nobody as a owner and group in /var/log/dansguardian/
3. login as root
4. run /usr/sbin/dansguardian

Expected result:

Error connecting to parent proxy as squid service is not started.
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2005-10-25 13:25:35 UTC
what permissions does the /var/log/dansguardian directory have?
Comment 2 Sachin Sawant 2005-10-25 21:11:44 UTC
The directory has owner and group as nobody.
Permission on directory set as 755. Even after giving 777 -R 
to /var/log/dansguardian still it showing same error.
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2005-10-31 20:29:39 UTC
can't reproduce it. 

are you sure that nobody user has rw access to /var/log/dansguardian/access.log?
switch to that user by running "su - nobody" (nobody should have a valid shell)
and try to edit that file.
Comment 4 Sachin Sawant 2005-11-03 20:14:15 UTC
Yes, user nobody has rw access for access.log file, able to edit access.log 
file with user "nobody" using bash shell.

pwcf ~ # ls -la /var/log/dansguardian/access.log
-rw-r-xr-x  1 nobody nobody 81 Nov  4 09:28 /var/log/dansguardian/access.log

Is there any way I can debug dansguardian in runtime. I am not sure during 
runtime does it really use "nobody" user for accessing log file bcoz if I 
login with nobody using bash shell and then try to run /usr/sbin/dansguardian 
it's works.
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2005-11-03 21:21:47 UTC
do you have 
 daemonuser = 'nobody'
 daemongroup = 'nobody'
in your config file?

see if revdep-rebuild want to rebuild something (this always should be the first
step when you're in trouble).
Comment 6 Sachin Sawant 2005-11-07 01:37:37 UTC
yes I do have "nobody" as daemonuser and daemongroup in config file.
revdep-rebuild output shows :-> Assigning files to ebuilds... Nothing to 
rebuild. The problem still continue..
Comment 7 John Lewis 2005-11-29 01:04:29 UTC
I have a similar problem but I am running DGAV too.

Everyday the log file permissions get changed to user "root" group "adm" and I
think DGAV runs as user "clamav".

I change the permissions manually and everything works until the log file is
archived and a new one created then dodgy permissions get put back on the file.

Please fix it.
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2005-12-08 14:58:07 UTC
does dansguardian works with following methods ?
 su - nobody
 sudo -u nobody
Comment 9 Alin Năstac (RETIRED) gentoo-dev 2005-12-20 07:39:01 UTC
the reporter has vanished.
anyway, the bug is likely to be an invalid one.