Bug 213834 - sysutils/bareos-server: /var/run/bareos has the wrong ownership
Summary: sysutils/bareos-server: /var/run/bareos has the wrong ownership
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jose Alonso Cardenas Marquez
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2016-10-27 15:50 UTC by Steve O.
Modified: 2017-04-21 18:01 UTC (History)
1 user (show)

See Also:
ohartmann: maintainer-feedback+
koobs: merge-quarterly?


Attachments
Patch to set the correct ownership on /var/run/bareos (232 bytes, patch)
2016-10-27 15:50 UTC, Steve O.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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