Why is ${prefix}/var/macports/home not owned by the macports user?

Ryan Schmidt ryandesign at macports.org
Thu Dec 31 18:41:38 UTC 2020



On Dec 31, 2020, at 09:49, Janosch Peters wrote:

> I am currently preparing a port file for the new port MacPass [1]. Installing and building works fine, but I do get some warnings because a tool preparing the build called carthage wants to create a file in ${prefix}/var/macports/home/Library. This fails because the folder is owned by root. Why is that?
> 
> I think the home folder of the macports user should be owned by macports, no?
> 
> If it is intended that the folder is owned by root, is there another way I can grant (temporary) write permissions to that folder to the macports user?

No, it is intentional that ports cannot write to that home directory. We do not want it to fill up with junk.

When a port is installed, MacPorts creates a new home directory just for that port, within the port's work directory. MacPorts sets the HOME environment variable to the path to that directory. Most tools honor that environment variable. If the tool you are using does not honor that, you could file that as a bug with the authors of that tool.



More information about the macports-users mailing list