Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 562662

Summary: net-analyzer/munin initscript should create working ownership/permissions for /run/munin
Product: Gentoo Linux Reporter: A. Person <tesoro302>
Component: Current packagesAssignee: Sysadmin Bugs <sysadmin>
Status: RESOLVED FIXED    
Severity: normal CC: alarig, bes.internal, graaff
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://github.com/gentoo/gentoo/pull/19982
Whiteboard:
Package list:
Runtime testing required: ---

Description A. Person 2015-10-09 14:26:39 UTC
Ownership and permissions of /run/munin are reset/recreated upon reboot and do not work for me.  chown munin:nginx and chmod g+x gets it working in my case.  Can something similar be built into the initscript?

I'm using munin-2.0.25-r1.
Comment 1 gollam6 2017-07-04 10:47:35 UTC
Hi,
This error just occured to me too.

Since /var/run is a tmpfs, it gets emptied on every reboot. It is owned by root, and the munin-cron job is running under user munin, so it get's a permission denied, when it tries to create the munin folder.

Something like this has to be run as root:

mkdir -p /var/run/munin && chown munin /var/run/munin
Comment 2 Hans de Graaff gentoo-dev Security 2017-07-18 19:30:02 UTC
Correct permissions should already be set up via the tmpfiles service. This was already the case in munin-2.0.19-r2 at least. Perhaps you are not using this service?
Comment 3 Vladimir Varlamov 2019-01-10 16:46:54 UTC
1.
net-analyzer/munin-2.0.43

># stat /run/
>File: /run/
>Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)


munin internaly do like:

>sudo -u munin mkdir <rundir from munin config>

and fail with 

>"cannot create directory ‘/run/munin’: Permission denied"


2.
> Correct permissions should already be set up via the tmpfiles service

What is this and how this intersects with munin?
Comment 4 Hans de Graaff gentoo-dev Security 2023-07-09 13:33:33 UTC
(In reply to Vladimir Varlamov from comment #3)

> > Correct permissions should already be set up via the tmpfiles service
> 
> What is this and how this intersects with munin?

https://wiki.gentoo.org/wiki/OpenRC#tmpfiles.d
Comment 5 Hans de Graaff gentoo-dev Security 2023-07-09 13:34:48 UTC
Closing this bug because the tmpfiles.d file should cover this and has been present in all recent versions.