[yocto] preserving file owners in do_package
Davide Soldan
davide.soldan at kynetics.it
Tue Oct 15 03:02:20 PDT 2013
Hi to all,
in my recipe I want to change owner and permission of a file, so I wrote:
do_install() {
ls -la ${D}/opt/user
chown -R user ${D}/opt/user
chgrp -R user ${D}/opt/user
ls -la ${D}/opt/user
chmod 754 ${D}/opt/user/user.sh
ls -la ${D}/opt/user
}
the output of ls commands is:
drwxr-xr-x 8 root root 4096 Oct 15 11:13 .
drwxr-xr-x 3 root root 4096 Oct 15 11:13 ..
-rw-r--r-- 1 *root root* 55753 Aug 2 08:48 user.sh
drwxr-xr-x 8 user user 4096 Oct 15 11:13 .
drwxr-xr-x 3 root root 4096 Oct 15 11:13 ..
-rw-r--r-- 1 *user user* 55753 Aug 2 08:48 user.sh
drwxr-xr-x 8 user user 4096 Oct 15 11:13 .
drwxr-xr-x 3 root root 4096 Oct 15 11:13 ..
*-rwxr-xr--* 1 user user 55753 Aug 2 08:48 user.sh
So the change of owner and permission works fine in do_install phase.
Opening the final rootfs tarball, however, the file user.sh has still 754 permission but root as owner...so do_package doesn't preserve owner change done in do_install? Or maybe I'm doing something wrong in changing file owner? Any ideas?
Thanks to all!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20131015/8c174974/attachment.html>
More information about the yocto
mailing list