tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Question: wip, git, ssh and permissions

			Hi tech-pkg@,

On 25/08/2015 00:23, Ottavio Caruso wrote:
> On 24 August 2015 at 22:21, Hubert Feyrer <> wrote:
>> On Mon, 24 Aug 2015, Ottavio Caruso wrote:
>>> If I connect to git using ssh under my regular non-root account, will
>>> I be able to transfer data, or should I connect using a root account,
>>> in which case I'll have to make another keypair under root?
>> Though shallst never work as root unless absolutely neccessary.
>> cvs and git most likely do not call for root.
> I am sorry, but if you want to write to /usr/pkgsrc you need root,
> don't you? Otherwise you have to "chown" the whole tree to your
> regular user.

There are instructions here:

As described here, I usually place my regular user in the "wsrc" group
when installing a system, and then just:
# mkdir -p /usr/src /usr/pkgsrc
# chgrp wsrc /usr/src /usr/pkgsrc
# chmod g+w /usr/src /usr/pkgsrc

From then on I can safely work in /usr/src and /usr/pkgsrc - although
these days I usually do so in $HOME instead, as the size of both src and
pkgsrc increases quicker than my /usr partition can.

The possibility to use sudo for SU_CMD was mentioned already, but I
usually set it up this way instead:
.if exists(${LOCALBASE}/bin/sudo)
SU_CMD=${LOCALBASE}/bin/sudo /bin/sh -c

Otherwise just SU_CMD will fail before sudo really is installed.


Home | Main Index | Thread Index | Old Index