All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: "Lu, Lianhao" <lianhao.lu@intel.com>
Cc: yocto@yoctoproject.org
Subject: Re: why cp in do_install() change file permission mode?
Date: Thu, 02 Dec 2010 08:55:55 -0500	[thread overview]
Message-ID: <4CF7A56B.9090508@windriver.com> (raw)
In-Reply-To: <C10D3FB0CD45994C8A51FEC1227CE22F1B90B6C267@shsmsx502.ccr.corp.intel.com>

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.

Cheers,

Bruce

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



  reply	other threads:[~2010-12-02 13:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 10:16 why cp in do_install() change file permission mode? Lu, Lianhao
2010-12-02 13:55 ` Bruce Ashfield [this message]
2010-12-02 17:13 ` Hatle, Mark
2010-12-10 16:20 ` Richard Purdie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CF7A56B.9090508@windriver.com \
    --to=bruce.ashfield@windriver.com \
    --cc=lianhao.lu@intel.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.