[yocto] why cp in do_install() change file permission mode?

Hatle, Mark mark.hatle at windriver.com
Thu Dec 2 09:13:45 PST 2010


Sorry for the brief response, but...

Do_install is performed under 'pseudo'.  Pseudo is a ld_preload that intercepts calls and captures permissions, users and groups settings to allow root-like actions to occur.

In order for the sstate components to be easily copied and manipulated outside of pseudo control, permissions are modified.

If you look at the produced package/filesystem image the permissions/owner/group will be as expected.  If you don't see that behavior then we should investigate.

Note pseudo only captures the attributes as set.  So if cp, install, etc doesn't set it -- pseudo won't capture it.

----- Original Message -----
From: Lu, Lianhao [mailto:lianhao.lu at intel.com]
Sent: Thursday, December 02, 2010 02:16 AM
To: yocto at yoctoproject.org <yocto at yoctoproject.org>
Subject: [yocto] why cp in do_install() change file permission mode?

Hi fellows,

Could anyone tell me why does the cp in do_install() change the file permission mode? Thanks!

do_install () {
	rm -rf ${D}${installed_dir}
	install -d ${D}${installed_dir}
	cp -rp ${S}/* ${D}${installed_dir}
}

After "bitbake xxx -c install", I found the file under ${D}${installed_dir} had the permission mode of 0744 while the corresponding file under directory ${S} had the mode of 0644. Why did this happen? How to avoid this kind of mode change? Thanks!

Best Regards
-Lianhao Lu
_______________________________________________
yocto mailing list
yocto at yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list