[Buildroot] Buildroot filesystem files' ownership

Bernhard Fischer rep.dot.nop at gmail.com
Sat Sep 29 10:12:59 UTC 2007


On Fri, Sep 28, 2007 at 04:24:40PM -0700, Leonid wrote:
>Hi:
>
>Buildroot documentation claims that entire filesystem can be created
>without root priviliges and this is true. However as a result all files
>in filesystem, residing in TARGET_DIR (even device nodes) belongs to
>USER, not to root. While trying to NFS into such filesystem, it doesn't
>work (no console output). I have expected that files which must belong
>to root will be "massaged" by fakeroot but this doesn't happen at least
>for TARGET_DIR.
>
>When I change ownership of all files in the filesystem to root

When you do this, you can no longer build as a user.
>
>sudo chown -Rf root.root .
>
>NFS is working fine. Questions:
>
>1) May be filesystem in the TARGET_DIR is not supposed to be used as
>real target FS - one must use .ext, .jffs2,... images? Where I get
>filesystem for NFS then?

Select either of the target filesystem outputs (e.g. tar) unpack that to
your preferred nfs root and use that copy. I don't remember offhand if
nfs has an option to make all exported files owned 0.0, check the
manpage.

>
>2) What files in the filesystem MUST belong to root - I suspect my
>changing all of them to root is overkill.

the device-nodes should probably initially be owned by root

HTH,



More information about the buildroot mailing list