add two users to a group

Adam Weinberger adamw at adamw.org
Thu Jan 26 14:00:19 UTC 2017


> On 26 Jan, 2017, at 6:29, Sergei Vyshenski <svysh.fbsd at gmail.com> wrote:
> 
> Hi,
> 
> Some ports need to add two users to a group. Example. Server openxpki needs
> to communicate with web server via a socket. Socket has permissions as:
> 
> srwxrwx---  1 openxpki  openxpki     0 Jan 20 11:00 openxpki.socket=
> 
> For this to work, we need to add user ${WWWOWN} to the group openxpki, that
> is we need to have :
> 
> /etc/group:
> openxpki:*:777:www
> 
> The problem is that when similar line in file /usr/ports/GIDs is processed
> by script
> /usr/ports/Mk/Scripts/do-users-groups.sh
> it ignores all but the very first user, specified for this group.
> 
> So only one user per group is allowed by the ports infrastructure.
> 
> Could you please recommend a clever way, how I can add the second user to
> the existing or new group?
> 
> Regards, Sergei

What about chown openxpki:www opnxpki.socket?

# Adam


-- 
Adam Weinberger
adamw at adamw.org
https://www.adamw.org



More information about the freebsd-ports mailing list