Date: Tue, 05 Jun 2012 13:06:45 +0200 From: Miroslav Lachman <000.fbsd@quip.cz> To: Baptiste Daroussin <bapt@freebsd.org> Cc: Arnaud Houdelette <freebsd@tzim.net>, freebsd-ports@freebsd.org Subject: Re: PKGNG upgrade / reinstall overides directory permissions Message-ID: <4FCDE845.8080903@quip.cz> In-Reply-To: <20120605100021.GR73254@ithaqua.etoilebsd.net> References: <4FCDCCFB.9080701@tzim.net> <20120605100021.GR73254@ithaqua.etoilebsd.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Baptiste Daroussin wrote: > On Tue, Jun 05, 2012 at 11:10:19AM +0200, Arnaud Houdelette wrote: >> Hello. >> >> I'm currently testing pkgng and poudriere as a replacement for old pkg >> and pkg_jail. >> >> When upgrading/reinstalling a port, pkg install / pkg upgrade resets the >> permissions of the directories created by the ports which already exist. >> >> Old pkg_add did not have this behavior. >> >> For example, >> - install lighttpd >> - chmod 750 /var/log/lighttpd >> - pkg install -f lighttpd >> >> => /var/log/lighttpd mode is reset to 700. >> >> Is this behavior correct ? Is there some option to avoid this ? >> >> Arnaud > > This is expected and there is no way to avoid this but fixing the ports itself > so that it create a 750 package. > > The package should be consistent and the permission should be set at the > package creation > time. > > Of course my view here might be wrong and I'm all open for aguments against that > :D I am against automatic (silent) overriding of modified directory permissions / owners. It is really annoying to correct it after each update of the port. I am not saying that it is problem of PKGNG, it is sometime problem elsewhere - in my example in rc script of courier-authdaemond which contains install -o courier -g courier -m 0750 -d "${authdaemonvar}" So after update / reinstall, Postfix cannot connect to courier-authdaemond socket to verify SMTP auth. I don't know how it should be done for all ports in the same way. Some ports let the user to create directories manually, some create them only if directories doesn't exist, some change owner and permission on existing directories (the worst case). In the case of Lighttpd, the Makefile contains LIGHTTPD_LOGROOT?= /var/log/lighttpd LIGHTTPD_WEBROOT?= ${PREFIX}/www/data LIGHTTPD_USER?= www LIGHTTPD_GROUP?= www PLIST_SUB+= LOGROOT="${LIGHTTPD_LOGROOT}" \ USER="${LIGHTTPD_USER}" \ GROUP="${LIGHTTPD_GROUP}" \ MKDIR="${MKDIR}" \ CHOWN="${CHOWN}" Is it possible to add "LIGHTTPD_LOGROOT_MODE" (or some other variable) to allow user to override default mode in make.conf? LIGHTTPD_LOGROOT_MODE?= 0750 Or is it already recorded in binary package and cannot be overriden in install time? Miroslav Lachman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FCDE845.8080903>