ports/106616: Default file modes set incorrect for non-root port installs

Steffen M. Boelaars boelaars at flatrock.eu
Mon Dec 11 21:41:53 UTC 2006


>Number:         106616
>Category:       ports
>Synopsis:       Default file modes set incorrect for non-root port installs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 11 21:10:10 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Steffen M. Boelaars
>Release:        6.0-RELEASE
>Organization:
Flat Rock ICT Services
>Environment:
FreeBSD hidden.hidden 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Mon Dec 12 23:29:47 CET 2005     hidden at hidden.hidden:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
The default values for BINMODE/SHAREMODE/MANMODE are incorrect when installing ports as a non-root user. Value 444 is used, which means that any file installed, can then not be changed by any following command. This problem does not occur for root, because root doesn't care about file permissions.
>How-To-Repeat:
Do an install as non-root user of for example converters/libiconv (see the article on my webpage for pointers on how this works: http://www.white-russian.nl/?page=/blog/2006/07/installing_free.html )

If the SHAREMODE var is not specificaly set in the environment it will not work. It makes sense to have this situation properly recognised by the ports mechanism.
>Fix:
Apply the following patch:

--- /usr/ports/Mk/bsd.port.mk   Sat Sep 30 21:25:45 2006
+++ /home/users/whiter/ports/Mk/bsd.port.mk     Mon Dec 11 21:35:35 2006
@@ -2248,6 +2248,9 @@
 _BINOWNGRP=
 _SHROWNGRP=
 _MANOWNGRP=
+BINMODE?=644
+SHAREMODE?=644
+MANMODE?=644
 .endif

 # A few aliases for *-install targets

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list