[yocto] permissions when installing scripts

Bas Mevissen abuse at basmevissen.nl
Mon Oct 15 12:02:32 PDT 2018


cp --preserve=mode might prevent that.
However, I'm wondering why the +x gets lost in the first place. Normal 
GNU copy seems to copy that flag by default. Even when doing it as root 
using sudo.

Aren't we looking in the wrong place for the executable bit(s) to fall 
off?

-- Bas.


On 2018-10-15 20:53, Burton, Ross wrote:
> cp -a will preserve ownership, which you don't want.
> 
> Ross
> On Mon, 15 Oct 2018 at 19:45, Bas Mevissen <abuse at basmevissen.nl> 
> wrote:
>> 
>> 
>> 
>> cp -a or --preserve(=<something>) optionally combined with other 
>> options
>> does the trick. However, using install is the better solution.
>> 
>> 
>> -- Bas.
>> 
>> On 2018-10-15 14:35, Burton, Ross wrote:
>> > As you've discovered, cp doesn't preserve permissions.  Using install
>> > -m755 is the idiom.
>> >
>> > Ross
>> > On Mon, 15 Oct 2018 at 11:12, Belisko Marek <marek.belisko at gmail.com>
>> > wrote:
>> >>
>> >> Hi,
>> >>
>> >> I have package which contains bunch of scripts (with +x flag for
>> >> user). When installed in do_install method (simply by copying them to
>> >> destination) they loose +x flag. I know copying directly is not best
>> >> approach but there exists better way how to keep scripts permissions
>> >> like in repo (except calling install -m 755 for all of them)? Thanks.
>> >>
>> >> BR,
>> >>
>> >> marek
>> >>
>> >> --
>> >> as simple and primitive as possible
>> >> -------------------------------------------------
>> >> Marek Belisko - OPEN-NANDRA
>> >> Freelance Developer
>> >>
>> >> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
>> >> Tel: +421 915 052 184
>> >> skype: marekwhite
>> >> twitter: #opennandra
>> >> web: http://open-nandra.com
>> >> --
>> >> _______________________________________________
>> >> yocto mailing list
>> >> yocto at yoctoproject.org
>> >> https://lists.yoctoproject.org/listinfo/yocto
>> 


More information about the yocto mailing list