Sorry. I was using NFS boot and was copying over the rootfs with "cp -r" instead of "cp -a", the permissions are fine. The only issue that remains is that I have to use "chmod -R 1000" i.e. the UID instead of the username otherwise I get the following error: """ | DEBUG: Python function extend_recipe_sysroot finished | DEBUG: Executing shell function do_install | install: invalid user ‘someusername’ """
On Fri, 19 Jul 2019 at 14:17, Sergio Torres Soldado < torres.sold...@gmail.com> wrote: > I am unable to set the home directory ownership. I am using poky@warrior > and my last attempt was the following recipe: > > """ > inherit useradd > USERADD_PACKAGES = "${PN}" > > USERADD_PARAM_${PN} = "-P someusername -u 1000 -d /home/someusername -r -s > /bin/bash foosomeusername" > > LICENSE = "CLOSED" > > do_install () { > install -d ${D}/home/someusername > # If I don't use the UID I get an error message saying "invalid user: > hubshuffle", although it seems to work for some usernames e.g. "user1" like > in the skeleton recipe for useradd. > chown -R 1000 ${D}/home/foosomeusername > } > > pkg_postinst_${PN} () { > chown -R 1000 $D/home/someusername > } > > FILES_${PN} = " \ > /home/someusername \ > " > """ > > I don't know what I am doing wrong, any hint is very welcome thanks. >
-- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto