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

Darin Perusich Darin.Perusich at cognigencorp.com
Thu May 28 16:39:31 CEST 2009


Peter Bonivart wrote:
> 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.

This is exactly what I need. The amanda package has a ton of files and
need to be owned by the amanda 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?
> 

Your explanation has cleared this up and is what I was thinking but it
just wasn't coming across in the documentation. I think the docs are to
terse and need a little more explanation so the ideas are properly
conveyed. I'm going to think about this for a bit and I'll write some
updates out and send them over to you.

-- 
Darin Perusich
Unix Systems Administrator
Cognigen Corporation
395 Youngs Rd.
Williamsville, NY 14221
Phone: 716-633-3463
Email: darinper at cognigencorp.com



More information about the maintainers mailing list