Permission denied -- Lion Server?

Ryan Schmidt ryandesign at macports.org
Tue Aug 7 18:27:32 PDT 2012


On Aug 7, 2012, at 20:19, Craig Treleaven <ctreleaven at cogeco.ca> wrote:

> A (potential) user is trying to help with testing a portfile I've developed, mythtv-core.25, but we're having a problem.  Originally, I've emailed him the Portfile and related support files.  He is running Lion Server with the latest MacPorts installed.  He was able to install qt4-mac +mysql (a dependency).  When he attempts to install Myth, all of Myth's dependencies ARE installed but then it aborts with the following error:
> 
> At 7:21 PM -0500 8/6/12, Nelson M Sanchez <Nelson M. Sanchez> wrote:
>> DEBUG: Attempting ln -sf /opt/local/var/macports/build/_Users_Nelson_mythtv-core.25-v20120731/mythtv-core.25/work /Users/Nelson/mythtv-core.25-v20120731/work
>> DEBUG: changing euid/egid - current euid: 0 - current egid: 0
>> DEBUG: egid changed to: 505
>> DEBUG: euid changed to: 502
>> DEBUG: could not read "/Users/Nelson/mythtv-core.25-v20120731/Portfile": permission denied
>>    while executing
>> "file mtime ${portpath}/Portfile"
>>    (procedure "open_statefile" line 47)
>>    invoked from within
>> "open_statefile"
>>    (procedure "check_variants" line 29)
>>    invoked from within
>> "check_variants activate"
>>    invoked from within
>> "$workername eval check_variants $target"
>>    (procedure "mportexec" line 7)
>>    invoked from within
>> "mportexec $workername $target"
>> Error: Unable to execute port: could not read "/Users/Nelson/mythtv-core.25-v20120731/Portfile": permission denied
> 
> Earlier, he was connecting to this machine via Apple Remote Desktop and I thought perhaps that was creating the permissions problem.  He is now working directly on the box so I think that was a red herring.
> 
> Could someone help us figure out was is going wrong?

MacPorts was modified some time ago to drop privileges to an unprivileged user (the "macports" user). While this change is nice for ensuring that ports don't go modifying files on your system that they're not authorized to modify, it throws a kind into our instructions for how to install from random Portfiles located anywhere on your disk, since the "macports" user probably won't have permission to read files in your home directory.




More information about the macports-dev mailing list