Permission denied -- Lion Server?

Craig Treleaven ctreleaven at cogeco.ca
Tue Aug 7 20:03:59 PDT 2012


At 9:54 PM -0500 8/7/12, Ryan Schmidt wrote:
>On Aug 7, 2012, at 20:39, Craig Treleaven <ctreleaven at cogeco.ca> wrote:
>
>>  At 8:27 PM -0500 8/7/12, Ryan Schmidt wrote:
>>>  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.
>>
>>  OK, but:
>>  1) MacPorts already read the Portfile to process the dependencies?!?
>
>Since you're running MacPorts with "sudo", it starts off as root 
>with full access to all files. I'm not sure at what point it drops 
>down to the macports user.
>
>>  2) I should have included that permissions seem to allow Everyone to read:
>
>That file, yes, perhaps. But every directory leading up to that 
>file? I suspect not. In particular I suspect /Users/whatever is 
>readable by that user only.

Excellent point--I'll check about that.

Offline, it was suggested to modify macports.conf and change the 
macportsuser to root.  I'm having the user have a go at that.

Craig


More information about the macports-dev mailing list