Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] Changing permission recursively
Date: Thu, 12 Mar 2015 21:32:00 +0100	[thread overview]
Message-ID: <5501F7C0.5050309@mind.be> (raw)
In-Reply-To: <20150312175527.GO2177@tarshish>

On 12/03/15 18:55, Baruch Siach wrote:
> Hi Angelo,
> 
> On Thu, Mar 12, 2015 at 10:08:10AM +0100, Angelo Compagnucci wrote:
>> I'm in the process of building a rootfs for a custom application and
>> wondering the best way to change permissions recursively for a
>> directory.
>>
>> What I'm trying to achieve is to add some files via an overlay, but
>> files should have a specific owner/permission which should be read
>> from the buildroot's users table.
>>
>> I cannot find something like that in the documentation. Instead, the
>> documentation specifies how to add single files and change
>> owner/permission accordingly.
>>
>> If I understand correctly, I should create a new user (if necessary)
>> with a specific UDI/GID and than use a POST_INSTALL_TARGET to change
>> permission using that UID/GID.
>> Alternatively, I can use FOO_PERMISSIONS with a per file granularity.
>>
>> Is this correct?
> 
> How about running the following from a post build script (untested):
> 
> 	${HOST_DIR}/usr/bin/fakeroot -- chown -R UID:GID ${1}/path/to/directory
> 
> baruch
> 

 I think it would be easier to extend package/makedevs/makedevs.c to support
recursive operation.


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2015-03-12 20:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-12  9:08 [Buildroot] Changing permission recursively Angelo Compagnucci
2015-03-12 12:41 ` Matthew Weber
2015-03-12 13:53   ` Angelo Compagnucci
2015-03-12 17:55 ` Baruch Siach
2015-03-12 20:32   ` Arnout Vandecappelle [this message]
2015-03-13  6:32     ` Thomas Petazzoni
2015-03-13  6:40       ` Angelo Compagnucci
2015-03-13  6:31   ` Thomas Petazzoni
2015-03-13  6:46     ` Angelo Compagnucci
2015-03-13 10:27       ` Baruch Siach
2015-03-13 10:53         ` Thomas Petazzoni
2015-03-13 10:59           ` Angelo Compagnucci

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=5501F7C0.5050309@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox