Recommended permissions and ownership of Subversion checkout of dports

Rainer Müller raimue at macports.org
Fri Oct 18 02:05:58 PDT 2013


On 2013-10-18 03:53, Ryan Schmidt wrote:
> 
> On Oct 17, 2013, at 07:34, Clemens Lang <cal at macports.org> wrote:
> 
>> On Wed, Oct 16, 2013 at 08:18:51PM -0500, Ryan Schmidt wrote:
>>> If my main dports tree is a Subversion working copy, what are
>>> the recommended permissions and user and group ownership so that
>>> "sudo port sync" and "svn update" and "svn commit" all work? It
>>> seems like I should understand this by now but I'm not getting
>>> it; what I'm getting are permission errors.
>> 
>> I use drwxrwx--- 54 clemens macports. The write permission for the 
>> MacPorts user might not be necessary, though.
> 
> Surely the macports user needs write permission to change things when
> running "sudo port sync"?

No, the update is run as the user owning the directory. See the
seteuid/setegid calls here using the owner/group attributes of
the port directory:

https://trac.macports.org/browser/trunk/base/src/macports1.0/macports.tcl?rev=112317#L2268

> [...] 
> I tried your suggestion. "sudo chown -R rschmidt:macports . && sudo
> chmod -R 770 ." in my dports directory. Then I ran "sudo port sync"
> which succeeded and pulled in a few updates. Then I checked
> permissions in the directory. Files updated by the sync do not have
> these permissions. For example, the gegl and glfw Portfiles have 644
> permissions instead of 770, so only the macports user can write to
> them, so trying to edit them in my editor results in the
> administrator password prompt that I'm trying to avoid.



More information about the macports-dev mailing list