Re: why cp in do_install() change file permission mode?

Bruce Ashfield <bruce.ashfield@...>

On 10-12-02 05:16 AM, Lu, Lianhao wrote:
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!
What's the umask of the your uid ? .. or maybe this is
one of those settings that is controlled by bitbake/poky.
But either way, it should just be that the cp is taking
the current umask which is changing the mode to 0744.

One option is to use install to copy the files, since it
allows a specific set of permissions to be set on its
command line.

I haven't looked into this at all, just some thoughts
off the top of my head.



Best Regards
-Lianhao Lu
yocto mailing list

Join to automatically receive all group messages.