[aur-general] Prefered way to create users/groups and handle files ownership
lundberg.emil at gmail.com
Tue Feb 4 01:01:52 EST 2014
> * One can perform system-independent actions in the PKGBUILD functions.
> This includes dictating where files should be installed.
> * One can perform system-dependent actions in the .install functions. This
> includes assigning an owner to a file (and, therefore, touching user IDs).
> I've rewritten the inspircd package so that file ownership is assigned in
> the .install file. This change means user ID and group ID numbers are never
> explicitly stated.
Yeah, I think this is the way to do it. I'm also surprised that no-one
else in the thread (me included) thought to suggest it. :)
Note that you can use the -U option in useradd to also create a group
by the same name, though I don't know how that behaves if the group
already exists and the user does not.
More information about the aur-general