Install -o -g doesn't set the right owner:group



I’ve included the following rule in my do_install task:

install -o technicien -m 0500 ${WORKDIR}/scripts/   	${D}${sbindir}/

install -o blackbox -g configuration -m 0660 ${WORKDIR}/config.json		${D}${sysconfdir}/

The files are in the specified directories and have the good rights but doesn’t own to the good owner:group owns to root:appsecSt
config.json owns to appfwupd:appfwupd

What is the problem please?



Could you look at the user & group ids using ls -n ?

Does the technicien/blackbox users and configuration group exist on the target?


@ CoRfr,

No, the users and group don’t exist.
In fact I can see the users in /etc/shadow but not in /etc/passwd.

I can see them in /home/xool/yocto/build_bin/tmp/work/swi_mdm9x15-poky-linux-gnueabi/mdm9x15-image-minimal/1.0-r0.0/rootfs/etc/passwdbut not on the target.

My bb file is that one:

inherit useradd
GROUPADD_PARAM_${PN} = "configuration"
USERADD_PARAM_${PN} = "-d /tmp -G configuration blackbox; -m -d /tmp -s /usr/sbin/ -G configuration -p wtmoOHy.mTsUk technicien"


do_install() {
        install -o technicien -m 0500 ${WORKDIR}/scripts/   	${D}${sbindir}/

According to the example I found here, I think it’s ok but maybe I made a mistake.

I can see a preinst script in blackbox_1.0-r0_arm-vfp-neon.ipk in armv7a-vfp-neon folder, nothing in swi-mdm9x15 is it normal?

EDIT: But according to the example pointed out above, it uses chgrp so does useradd -G works?