Closed box293 closed 5 years ago
From your own output:
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4 # gmake install
cd ./base && gmake install
gmake[1]: Entering directory '/tmp/nagioscore-nagios-4.3.4/base'
gmake install-basic
gmake[2]: Entering directory '/tmp/nagioscore-nagios-4.3.4/base'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios nagios /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios nagiostats /usr/local/nagios/bin
What happens if you follow those steps manually?
cd /tmp/nagioscore-nagios-4.3.4/base
/usr/bin/install -c -m 774 -o nagios -g nagios nagios /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios nagiostats /usr/local/nagios/bin
If that fails, try this:
cd /tmp/nagioscore-nagios-4.3.4/base
/tmp/nagioscore-nagios-4.3.4/install-sh -c -m 774 -o nagios -g nagios nagios /usr/local/nagios/bin
/tmp/nagioscore-nagios-4.3.4/install-sh -c -m 774 -o nagios -g nagios nagiostats /usr/local/nagios/bin
Regardless I'll take a look - but let me know what goes on with either or both or any of those commands.
So after some playing, those commands do actually set the permissions correctly. It is the strip-post-install
commands that are removing the permissions:
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4 # cd base/
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # /usr/bin/install -c -m 774 -o nagios -g nagios nagios /usr/local/nagios/bin
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # /usr/bin/install -c -m 774 -o nagios -g nagios nagiostats /usr/local/nagios/bin
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # ls -la /usr/local/nagios/bin
total 2344
drwxrwxr-x 2 nagios nagios 512 Aug 28 10:04 .
drwxr-xr-x 7 root wheel 512 Aug 28 09:56 ..
-rwxrwxr-- 1 nagios nagios 2230448 Aug 28 10:04 nagios
-rwxrwxr-- 1 nagios nagios 97528 Aug 28 10:04 nagiostats
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # /usr/bin/strip /usr/local/nagios/bin/nagios
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # ls -la /usr/local/nagios/bin
total 840
drwxrwxr-x 2 nagios nagios 512 Aug 28 10:04 .
drwxr-xr-x 7 root wheel 512 Aug 28 09:56 ..
-rwxrwxr-- 1 root wheel 700336 Aug 28 10:04 nagios
-rwxrwxr-- 1 nagios nagios 97528 Aug 28 10:04 nagiostats
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # /usr/bin/strip /usr/local/nagios/bin/nagiostats
root@fbsdxx:/tmp/nagioscore-nagios-4.3.4/base # ls -la /usr/local/nagios/bin
total 784
drwxrwxr-x 2 nagios nagios 512 Aug 28 10:04 .
drwxr-xr-x 7 root wheel 512 Aug 28 09:56 ..
-rwxrwxr-- 1 root wheel 700336 Aug 28 10:04 nagios
-rwxrwxr-- 1 root wheel 37312 Aug 28 10:04 nagiostats
This only seems to affect FreeBSD 11 though, in my testing on all other OS's this problem did not arise (Nagios started OK).
Checked this out, it seems like install -s
exists to prevent exactly this issue. I didn't see any differences in the man pages for the major distros either.
Resolved by #667
When installing Core 4.3.4 on FreeBSD 11.x the service fails to start and the
nagios.log
file contains:Checking the files:
For some reason nagios:nagios has not been applied.
Following the identical procedure on FreeBSD 10.3 yields the correct permissions:
Here is the full output of the build: