Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Apr 2017 08:53:42 +0000
From:      freebsd@jonathanprice.org
To:        freebsd-ports@freebsd.org
Subject:   Issue with folder permissions in net-mgmt/librenms
Message-ID:  <7044ba33fd0394ed4af6f318faec2dd6@mail.jonathanprice.org>

next in thread | raw e-mail | index | archive | help
Hi,=0A=0AI recently completed work on a number of bugfixes with net-mgmt/=
librenms, and for the most part there's only 1 remaining issue I have bee=
n struggling with.=0A=0ABasically, the entire /usr/local/www/librenms sho=
uld be owned www:www. However, a bunch of folders are root:wheel.=0A=0AI'=
ve noticed that the folders that aren't having their permissions set are =
all the members of the ROOT_DIRS=3D variable.=0A=0AI believe these sectio=
ns of Makefile will be relevant:=0A=0Ado-install:=0A...=0A.for dir in ${R=
OOT_DIRS}=0A        @${MKDIR} ${STAGEDIR}/${WWWDIR}/${dir}=0A        @cd =
${WRKSRC}/${dir} && ${COPYTREE_SHARE} . ${STAGEDIR}/${WWWDIR}/${dir}=0A.e=
ndfor=0A...=0A=0Apost-install:=0A        @${ECHO_CMD} "@owner ${WWWOWN}" =
>> ${TMPPLIST}=0A        @${ECHO_CMD} "@group ${WWWGRP}" >> ${TMPPLIST}=
=0A        @${FIND} -s ${STAGEDIR}${WWWDIR} -not -type d | ${SORT} | \=0A=
                ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' >> ${TMPPLIST}=0A =
       ${INSTALL_DATA} ${WRKSRC}/config.php.default \=0A               ${=
STAGEDIR}/${WWWDIR}/config.php.sample=0A        @${ECHO} @sample ${WWWDIR=
}/config.php.sample >> ${TMPPLIST}=0A        @${ECHO} @dir ${WWWDIR}/rrd =
>> ${TMPPLIST}=0A        @${ECHO} @dir ${WWWDIR}/logs >> ${TMPPLIST}=0A  =
      @${ECHO} @dir ${WWWDIR}/lib/influxdb-php/vendor/guzzlehttp/guzzle/b=
uild >> ${TMPPLIST}=0A        @${ECHO} @dir ${WWWDIR}/lib/influxdb-php/ve=
ndor/guzzlehttp/guzzle/docs >> ${TMPPLIST}=0A        @${ECHO} @dir ${WWWD=
IR}/lib/influxdb-php/vendor/guzzlehttp/guzzle/tests >> ${TMPPLIST}=0A    =
    @${ECHO_CMD} "@group" >> ${TMPPLIST}=0A        @${ECHO_CMD} "@owner" =
>> ${TMPPLIST}=0A=0AHowever, if I look at work/.PLIST.mktmp, everything s=
eems to be in order (extract below:=0A=0A@owner www=0A@group www=0A...=0A=
www/librenms/vendor/ulrichsg/getopt-php/CHANGELOG.md=0Awww/librenms/vendo=
r/ulrichsg/getopt-php/LICENSE=0Awww/librenms/vendor/ulrichsg/getopt-php/M=
akefile=0A...=0A@group=0A@owner=0A=0AIn the above example, "vendor" is on=
e of the directories that's being set to root:wheel.=0A=0AI believe the p=
roblem could lie with the find command. I tried removing "-not -type d", =
but that seemed to cause most files to not be installed at all. That does=
 however prove that the erroneous folders ARE being added to the TMPPLIST=
, otherwise they wouldn't get installed in the first place.=0A=0AAs one w=
ould imagine, the staging directory is all root:wheel=0A=0AIf anyone has =
any suggestions, it would be great to hear!=0A=0AThanks,=0AJonathan.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7044ba33fd0394ed4af6f318faec2dd6>