[csw-maintainers] setting file/dir ownership with cswusergroup

Peter Bonivart bonivart at opencsw.org
Thu May 28 15:43:17 CEST 2009


On Thu, May 28, 2009 at 3:21 PM, Darin Perusich
<Darin.Perusich at cognigencorp.com> wrote:
> I was reviewing the classutils documentation on setting file/dir
> ownership and I'm not clear on how this is accomplished.
>
> The documentation talks about assigning a new class, called 'ugfiles',
> and assigning it to the files/dirs. Is this 'ugfiles' just an arbitrary
>  name or is it something associated with the cswusergroup class?

This step is only needed if you want files/dirs owned by the new user.
If you only needed a user to run a service you can skip it. An example
is my ClamAV package which has a service that runs with the clamav
user and the signature databases needs to be owned by this user.

Assuming you still want this, the problem is that the "none" class is
always executed first so if your files are in this class the new user
will not exist yet, ok? That's why we need an extra class for these
files so we can tell pkgadd to run this class after cswusergroup, like
this:

CLASSES = none cswusergroup ugfiles

This way the user is created by cswusergroup before files owned by
this user are processed.

> Maybe I'm just being thickheaded but I am not finding this part of
> documentation confusing and unclear.

I hope I just explained it better. Any way to improve the documentation?

-- 
/peter



More information about the maintainers mailing list