Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Oct 2014 19:11:11 -0500
From:      Richard Todd <rmtodd@servalan.servalan.com>
To:        Lowell Gilbert <freebsd-ports-local@be-well.ilk.org>, freebsd-ports@freebsd.org 
Subject:   Ports permissions problems in general? (was Re: mail/postgrey and database permissions
Message-ID:  <x71tpqs9gg.fsf@ichotolot.servalan.com>
In-Reply-To: <44ppdao605.fsf@lowell-desk.lan> (Lowell Gilbert's message of "Wed, 29 Oct 2014 18:39:22 -0400")
References:  <44ppdao605.fsf@lowell-desk.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
Lowell Gilbert <freebsd-ports-local@be-well.ilk.org> writes:

> I did a rebuild of my postgrey installation today, and ended up having
> to change the permissions of its database directory by hand afterward. 
>
> How is that supposed to work? I didn't see anything in the port itself,
> but I figured there are enough ports that need to do this sort of thing
> that some sort of magic probably exists in the Mk/ directory to chgrp
> (or chown) and chmod the directory. I didn't spot anything there
> either. What's missing?

I'm not sure quite how perms are set (I think it's somewhere in
pkg-plist).  I do, however, think something in the ports system changed
recently regarding this, as after a recent package rebuild of everything
here (via poudriere, after upgrading to FreeBSD 10.x from 9.x) and
appropriate "pkg upgrade"-ing, I found that my UUCP setup
(net/freebsd-uucp) had stopped working due to permission issues (IIRC
the symptom was that uucico no longer could execute uuxqt).  At the 
time I didn't have a chance to look into this in more detail and just
chmoded things until they started working, but now do have time to 
study this further.

Okay, I've got an older package of freebsd-uucp built Aug 27 on 9.x:
-rw-r--r--  1 root  wheel  365580 Aug 27 18:43 /poudriere/data/packages/releng9-amd64-default/All/freebsd-uucp-1.07.3_1.txz

and a newer one built Oct 9 on 10.x:

-rw-r--r--  1 root  wheel  357816 Oct 10 06:16 /poudriere/data/packages/releng10-amd64-default/All/freebsd-uucp-1.07.3_1.txz

and have just tried installing both of them (one after the other) on a 
spare 10.x VM.  The permissions afterwards of the installed files are
quite different:

The older, "good" package:
-r-sr-sr-x  1 uucp  dialer  155696 Aug 27 18:43 /usr/local/bin/cu
-r-sr-xr-x  1 uucp  wheel   110632 Aug 27 18:43 /usr/local/bin/uucp
-r-xr-xr-x  1 root  wheel    75960 Aug 27 18:43 /usr/local/bin/uulog
-r-sr-xr-x  1 uucp  dialer   46624 Aug 27 18:43 /usr/local/bin/uuname
-r-xr-xr-x  1 root  wheel    84704 Aug 27 18:43 /usr/local/bin/uupick
-r-xr-xr-x  1 root  wheel      329 Aug 27 18:43 /usr/local/bin/uusched
-r-sr-sr-x  1 uucp  dialer  120096 Aug 27 18:43 /usr/local/bin/uustat
-r-xr-xr-x  1 root  wheel     1970 Aug 27 18:43 /usr/local/bin/uuto
-r-sr-xr-x  1 uucp  wheel   110368 Aug 27 18:43 /usr/local/bin/uux
-r--r--r--  1 root  wheel      271 Aug 27 18:43 /usr/local/etc/mtree/uucp-local.mtree
-r--r--r--  1 root  wheel      342 Aug 27 18:43 /usr/local/etc/mtree/uucp-var.mtree
-rwxr-xr-x  1 root  wheel      883 Aug 27 18:43 /usr/local/etc/periodic/daily/340.uucp
-rwxr-xr-x  1 root  wheel      734 Aug 27 18:43 /usr/local/etc/periodic/daily/410.status-uucp
-rwxr-xr-x  1 root  wheel      868 Aug 27 18:43 /usr/local/etc/periodic/weekly/300.uucp
-r--r-----  1 uucp  uucp       927 Aug 27 18:43 /usr/local/etc/uucp/call.sample
-r--r-----  1 uucp  uucp      4244 Aug 27 18:43 /usr/local/etc/uucp/config.sample
-r--r-----  1 uucp  uucp      1581 Aug 27 18:43 /usr/local/etc/uucp/dial.sample
-r--r-----  1 uucp  uucp       838 Aug 27 18:43 /usr/local/etc/uucp/dialcode.sample
-r--r-----  1 uucp  uucp       918 Aug 27 18:43 /usr/local/etc/uucp/passwd.sample
-r--r-----  1 uucp  uucp      1522 Aug 27 18:43 /usr/local/etc/uucp/port.sample
-r--r-----  1 uucp  uucp      1517 Aug 27 18:43 /usr/local/etc/uucp/sys1.sample
-r--r-----  1 uucp  uucp      1535 Aug 27 18:43 /usr/local/etc/uucp/sys2.sample
-r--r--r--  1 root  wheel   345609 Aug 27 18:43 /usr/local/info/uucp.info
-r-sr-sr-x  1 uucp  dialer  270952 Aug 27 18:43 /usr/local/libexec/uucp/uucico
-r-sr-s---  1 uucp  uucp    123240 Aug 27 18:43 /usr/local/libexec/uucp/uuxqt
-r-xr-xr-x  1 root  wheel    11496 Aug 27 18:43 /usr/local/libexec/uucpd
-r--r--r--  1 root  wheel     2791 Aug 27 18:43 /usr/local/man/man1/cu.1.gz
-r--r--r--  1 root  wheel      939 Aug 27 18:43 /usr/local/man/man1/uuconv.1.gz
-r--r--r--  1 root  wheel     2176 Aug 27 18:43 /usr/local/man/man1/uucp.1.gz
-r--r--r--  1 root  wheel     1112 Aug 27 18:43 /usr/local/man/man1/uulog.1.gz
-r--r--r--  1 root  wheel      581 Aug 27 18:43 /usr/local/man/man1/uuname.1.gz
-r--r--r--  1 root  wheel      775 Aug 27 18:43 /usr/local/man/man1/uupick.1.gz
-r--r--r--  1 root  wheel     3459 Aug 27 18:43 /usr/local/man/man1/uustat.1.gz
-r--r--r--  1 root  wheel      636 Aug 27 18:43 /usr/local/man/man1/uuto.1.gz
-r--r--r--  1 root  wheel     2852 Aug 27 18:43 /usr/local/man/man1/uux.1.gz
-r--r--r--  1 root  wheel      564 Aug 27 18:43 /usr/local/man/man8/uuchk.8.gz
-r--r--r--  1 root  wheel     2636 Aug 27 18:43 /usr/local/man/man8/uucico.8.gz
-r--r--r--  1 root  wheel     1372 Aug 27 18:43 /usr/local/man/man8/uucpd.8.gz
-r--r--r--  1 root  wheel      432 Aug 27 18:43 /usr/local/man/man8/uusched.8.gz
-r--r--r--  1 root  wheel      973 Aug 27 18:43 /usr/local/man/man8/uuxqt.8.gz
-r-xr-xr-x  1 root  wheel    82480 Aug 27 18:43 /usr/local/sbin/uuchk
-r-xr-xr-x  1 root  wheel    91592 Aug 27 18:43 /usr/local/sbin/uuconv

And the newer, "bad" package:
-r-sr-sr-x  1 root  dialer  143344 Oct 10 06:16 /usr/local/bin/cu
-r-sr-xr-x  1 root  wheel   102168 Oct 10 06:16 /usr/local/bin/uucp
-r-xr-xr-x  1 root  wheel    69168 Oct 10 06:16 /usr/local/bin/uulog
-r-sr-xr-x  1 root  dialer   44432 Oct 10 06:16 /usr/local/bin/uuname
-r-xr-xr-x  1 root  wheel    77344 Oct 10 06:16 /usr/local/bin/uupick
-r-xr-xr-x  1 root  wheel      329 Oct 10 06:16 /usr/local/bin/uusched
-r-sr-sr-x  1 root  wheel   110856 Oct 10 06:16 /usr/local/bin/uustat
-r-xr-xr-x  1 root  wheel     1970 Oct 10 06:16 /usr/local/bin/uuto
-r-sr-xr-x  1 root  wheel   102072 Oct 10 06:16 /usr/local/bin/uux
-rw-r--r--  1 root  wheel      271 Oct 10 06:16 /usr/local/etc/mtree/uucp-local.mtree
-rw-r--r--  1 root  wheel      342 Oct 10 06:16 /usr/local/etc/mtree/uucp-var.mtree
-rwxr-xr-x  1 root  wheel      883 Oct 10 06:16 /usr/local/etc/periodic/daily/340.uucp
-rwxr-xr-x  1 root  wheel      734 Oct 10 06:16 /usr/local/etc/periodic/daily/410.status-uucp
-rwxr-xr-x  1 root  wheel      868 Oct 10 06:16 /usr/local/etc/periodic/weekly/300.uucp
-r--r-----  1 root  wheel      927 Oct 10 06:16 /usr/local/etc/uucp/call.sample
-r--r-----  1 root  wheel     4244 Oct 10 06:16 /usr/local/etc/uucp/config.sample
-r--r-----  1 root  wheel     1581 Oct 10 06:16 /usr/local/etc/uucp/dial.sample
-r--r-----  1 root  wheel      838 Oct 10 06:16 /usr/local/etc/uucp/dialcode.sample
-r--r-----  1 root  wheel      918 Oct 10 06:16 /usr/local/etc/uucp/passwd.sample
-r--r-----  1 root  wheel     1522 Oct 10 06:16 /usr/local/etc/uucp/port.sample
-r--r-----  1 root  wheel     1517 Oct 10 06:16 /usr/local/etc/uucp/sys1.sample
-r--r-----  1 root  wheel     1535 Oct 10 06:16 /usr/local/etc/uucp/sys2.sample
-rw-r--r--  1 root  wheel   345609 Oct 10 06:16 /usr/local/info/uucp.info
-r-sr-sr-x  1 root  dialer  259752 Oct 10 06:16 /usr/local/libexec/uucp/uucico
-r-sr-s---  1 root  uucp    115008 Oct 10 06:16 /usr/local/libexec/uucp/uuxqt
-r-xr-xr-x  1 root  wheel    11464 Oct 10 06:16 /usr/local/libexec/uucpd
-r--r--r--  1 root  wheel     2791 Oct 10 06:16 /usr/local/man/man1/cu.1.gz
-r--r--r--  1 root  wheel      939 Oct 10 06:16 /usr/local/man/man1/uuconv.1.gz
-r--r--r--  1 root  wheel     2176 Oct 10 06:16 /usr/local/man/man1/uucp.1.gz
-r--r--r--  1 root  wheel     1112 Oct 10 06:16 /usr/local/man/man1/uulog.1.gz
-r--r--r--  1 root  wheel      581 Oct 10 06:16 /usr/local/man/man1/uuname.1.gz
-r--r--r--  1 root  wheel      775 Oct 10 06:16 /usr/local/man/man1/uupick.1.gz
-r--r--r--  1 root  wheel     3459 Oct 10 06:16 /usr/local/man/man1/uustat.1.gz
-r--r--r--  1 root  wheel      636 Oct 10 06:16 /usr/local/man/man1/uuto.1.gz
-r--r--r--  1 root  wheel     2852 Oct 10 06:16 /usr/local/man/man1/uux.1.gz
-r--r--r--  1 root  wheel      564 Oct 10 06:16 /usr/local/man/man8/uuchk.8.gz
-r--r--r--  1 root  wheel     2636 Oct 10 06:16 /usr/local/man/man8/uucico.8.gz
-r--r--r--  1 root  wheel     1372 Oct 10 06:16 /usr/local/man/man8/uucpd.8.gz
-r--r--r--  1 root  wheel      432 Oct 10 06:16 /usr/local/man/man8/uusched.8.gz
-r--r--r--  1 root  wheel      973 Oct 10 06:16 /usr/local/man/man8/uuxqt.8.gz
-r-xr-xr-x  1 root  wheel    77008 Oct 10 06:16 /usr/local/sbin/uuchk
-r-xr-xr-x  1 root  wheel    86000 Oct 10 06:16 /usr/local/sbin/uuconv

Note how many of the executables that were suid uucp in the "good"
package are now suid root in the "bad" package, also that the conf 
files that were owned by uucp in the old package are now owned by root.
In general it looks like lots of stuff isn't getting set to the right
owner.  This has *got* to be due to some change either in pkg or in the
/usr/ports/Mk/* stuff, as the net/freebsd-uucp port itself hasn't been
touched in six months.




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