Unable to install ports from git source as root : Could not open file

Christopher Jones jonesc at hep.phy.cam.ac.uk
Mon Jan 14 19:41:33 UTC 2019


Hi,
> 
> Any location inside your home directory is not a suitable location for a ports tree, because macOS configures the permissions of your home directory so that other users cannot access it; that includes the macports user that MacPorts uses when you install it as root. Either move your git checkout of the ports tree outside of your home directory, or else change the permissions of your home directory to give other users access to it (understanding the possible security implications of doing that).

Its not necessary to change the permissions of your entire home area to do this, which I agree is a bad idea. It is enough to just clone the git ports tree in a sub-dir that has read access for all. Just create a directory in your home area (say Foo) and then clone the git ports tree into that. By default that new sub-dir will have read access

Oberon ~ > mkdir Foo
Oberon ~ > ls -lth | grep Foo
drwxr-xr-x   2 chris  staff    64B 14 Jan 19:35 Foo

I have been doing this for years and have no troubles…

Chris


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190114/3d208e4b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1930 bytes
Desc: not available
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190114/3d208e4b/attachment.bin>


More information about the macports-users mailing list