Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477630 - sys-devel/distcc-3.1-r8 - ERROR: failed to open /var/log/distccd.log: Permission denied
Summary: sys-devel/distcc-3.1-r8 - ERROR: failed to open /var/log/distccd.log: Permiss...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-21 11:37 UTC by Thomas Deutschmann (RETIRED)
Modified: 2023-07-14 02:06 UTC (History)
7 users (show)

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 Thomas Deutschmann (RETIRED) gentoo-dev 2013-07-21 11:37:29 UTC
Hi,

sys-devel/distcc-3.1-r8 changed the default log configuration from

--log-level critical

to

--log-level notice --log-file /var/log/distccd.log

This changes logging into syslog to logging into a logfile.

See bug 470848.


Now I get this error when I start distcc:
# /etc/init.d/distccd restart
 * Caching service dependencies
 * Stopping distccd
 * Starting distccd ...
distccd[1874] (dcc_setup_real_log) ERROR: failed to open /var/log/distccd.log: Permission denied


If this should be the new default, please fix the problem or revert back to the previous default (logging into syslog).

I would vote for logging into syslog.

Reproducible: Always
Comment 1 Piotr Szymaniak 2013-07-22 22:30:43 UTC
Got the same error.
Comment 2 bagrx 2013-07-27 06:16:39 UTC
Got the same error.

Log should have distcc:root owner 

chown distcc:root /var/log/distccd.log
Comment 3 Wojciech Myrda 2013-10-08 10:21:31 UTC
(In reply to Bagr from comment #2)
> Got the same error.
> 
> Log should have distcc:root owner 
> 
> chown distcc:root /var/log/distccd.log

I confirm this fixes the error. What's strange however is that when I deleted the file to see what permissions would be set up with there was no new file created. Perhaps that need to be looked at as well
Comment 4 Thomas Deutschmann (RETIRED) gentoo-dev 2013-10-08 12:19:36 UTC
(In reply to Wojciech Myrda from comment #3)
> (In reply to Bagr from comment #2)
> > Got the same error.
> > 
> > Log should have distcc:root owner 
> > 
> > chown distcc:root /var/log/distccd.log
> 
> I confirm this fixes the error. What's strange however is that when I
> deleted the file to see what permissions would be set up with there was no
> new file created. Perhaps that need to be looked at as well

You are right:

distccd[19280] (dcc_setup_real_log) ERROR: failed to open /var/log/distcc.log: Permission denied

Two ways to fix that:

1) Use syslog instead of a log file (that's what I am using, just remove the "--log-file" parameter). Not sure why this default changed with 3.1-r8.

2) If the default log target should be a log file, we need a sub folder for distcc, e.g. /var/log/distcc with the correct permission.
Comment 5 Xavier Miller (RETIRED) gentoo-dev 2013-10-08 12:24:35 UTC
Using syslog is not a good idea, because distccd.log can be huge when clients are compiling.
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2013-10-08 12:43:17 UTC
(In reply to Xavier Miller from comment #5)
> Using syslog is not a good idea, because distccd.log can be huge when
> clients are compiling.

Can you elaborate why this can become a problem?

- syslog is really powerful

- There's no difference between distcc, which will directly write to /var/log/distcc.log or distcc, which will use syslog... is there?

- At the end all comes down the used log level. But to be honest, I don't see a problem with log level "notice". Finally, if you client has problems with logging, you would turn it off, won't you?


...but maybe I am missing something?
Comment 7 CaptainBlood 2014-03-11 06:31:02 UTC
Hi dear all,

For the record, my system requires execution of the following commands :

mkdir /var/log/distcc
chown distcc:daemon /var/log/distcc

Don't forget to update /etc/conf.d/distccd according to the new path.
distccd.log will be created with same ownership

Thanks for your attention.
Comment 8 Matthew Marchese Gentoo Infrastructure gentoo-dev 2015-01-22 21:42:56 UTC
Why hasn't this been fixed yet? Just curious...
Comment 9 Johannes Willem (Hans) Fernhout 2015-03-13 19:28:55 UTC
Just to confirm: this bug still exists.
Comment 10 Michael 'veremitz' Everitt 2017-04-09 12:18:16 UTC
Is this really outstanding still ?!

I use distcc a fair bit, but perhaps I have just fixed the issue without noticing/filing a bug before!

Should be a really easy fix - will try a fresh emerge, and file a PR if it is still failing.

Feel free to ACK if you're still seeing this too, pls!
Comment 11 Michael 'veremitz' Everitt 2017-04-09 12:23:37 UTC
(In reply to Michael Everitt (IRC: veremit) from comment #10)
> Is this really outstanding still ?!
> 
> I use distcc a fair bit, but perhaps I have just fixed the issue without
> noticing/filing a bug before!
> 
> Should be a really easy fix - will try a fresh emerge, and file a PR if it
> is still failing.
> 
> Feel free to ACK if you're still seeing this too, pls!

Aha, I see the problem lies in the included conf.d file .. https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/distcc/files/3.1/conf

no longer present in the 3.2 conf ..
https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/distcc/files/3.2/conf
.
Comment 12 Michael 'veremitz' Everitt 2017-04-09 12:41:12 UTC
See also: bug 510036 & bug 493680
Comment 14 Michael Patton 2023-07-14 02:06:41 UTC
(In reply to Michael 'veremitz' Everitt from comment #11)
> (In reply to Michael Everitt (IRC: veremit) from comment #10)
> > Is this really outstanding still ?!
> > 
> > I use distcc a fair bit, but perhaps I have just fixed the issue without
> > noticing/filing a bug before!
> > 
> > Should be a really easy fix - will try a fresh emerge, and file a PR if it
> > is still failing.
> > 
> > Feel free to ACK if you're still seeing this too, pls!
> 
> Aha, I see the problem lies in the included conf.d file ..
> https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/distcc/files/3.1/
> conf https://penaltykickonline.com
> 
> no longer present in the 3.2 conf ..
> https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/distcc/files/3.2/
> conf
> .
It is imperative that you remember to modify /etc/conf.d/distccd so that it reflects the new path.
It is planned to produce distccd.log with the same ownership.