Bug 213834

Summary: sysutils/bareos-server: /var/run/bareos has the wrong ownership
Product: Ports & Packages Reporter: Steve O. <frank>
Component: Individual Port(s)Assignee: Jose Alonso Cardenas Marquez <acm>
Status: Closed FIXED    
Severity: Affects Many People CC: ohartmann
Priority: --- Keywords: easy
Version: LatestFlags: ohartmann: maintainer-feedback+
koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to set the correct ownership on /var/run/bareos none

Description Steve O. 2016-10-27 15:50:59 UTC
Created attachment 176219 [details]
Patch to set the correct ownership on /var/run/bareos

Wrong ownership of /var/run/bareos prevents e.g. bareos storage daemon from starting, as it can't create the pid file.

Usually the director- and storage- daemon run as user/group bareos only the filedaemon is run as root.

See bareos_sd_flags e.g. in sysutils/bareos-server/files/bareos-sd.in .
Comment 1 O. Hartmann 2016-11-16 19:37:01 UTC
In case /var/run is on tmpfs, the folder /var/run/bareos doesn't exist, the startup of any bareos service fails.

With the patchset provided herein the folder and its correct ownership is only guaranteed when the port(s) is/are installed - any reboot of a box with /var/run as tmpfs renders the bareos service non-working as /var/run/bareos is gone.

I tried to solve this issue with Bug 212282 , but made a mistake by adding the two lines of 

+required_files=${bareos_dir_configfile}
+required_dirs=${pidfile%/*}

in each patchset - I'll correct this. 

It seems that with the update from Bareos 15 to 16 the maintainer has this consideration deemed useless.
Comment 2 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2017-04-21 18:01:07 UTC
Fixed on lastest commit of bareos ports