ltib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ltib] file system permission error when constructing final image


From: seh
Subject: Re: [Ltib] file system permission error when constructing final image
Date: Wed, 13 Oct 2010 04:21:21 -0400
User-agent: SquirrelMail/1.4.19

Hi Aaron,

Fundamentally what you're running into is a compromise put in place so
that creating images does not run as the root user.

To make a jffs2 image (or other image), the rootfs area is effectively
copied as a normal user and filtered (to removed unwanted man pages etc to
keep the size small).  Once this staging area is made, mkfs.jffs2 (or
other) is run on it to create the image.

Although all rootfs area can be installed (by rpm) with the exact
permissions you need, when you create an image from it as a normal user,
if the permissions are too restrictive (as you found) you get errors.

To work around this you could modify LTIB and run that "find" line as
sudo/root, or what I would recommend is adding some fixup code into
/etc/rc.d/rc.local (add it to merge) to set the permissions to exactly
what you need at boot up time.

To be perfectly honest, in most cases for an embedded device having 755
permissions on /root should not be an issue.

Regards, Stuart


> Hi Stuart.  I was hoping you could shed some light on file system
> permissions when constructing the rootfs image.  Mine is .jffs2.  In my
> ltib configuration I have three packages creating the /root directory.
>
> $ sudo /opt/ltib/usr/bin/rpm --root /home/aaron/0324/ltib/rootfs --dbpath
> /var/lib/rpm -q --whatprovides /root
> skell-1.19-1
> gei-target-apps-0324.1-1
> cpas-1-1
> merge-0.1-1
>
> The gei* and cpas are custom.  I know it's bad to use merge and whatnot,
> and believe me I've cut down significantly.  I could omit the /root in
> merge, but then it would also be in those other packages.  My question is
> how the permissions are set in the file system image and how you could
> modify them to suit your need.  I had set my /root dir in merge to be
> similar to my own Linux workstation
>
> dr-xr-x---.  23 root root  4096 2010-10-12 15:23 root
>
> but this caused all kinds of problems for me today, unexpectedly.  I had
> to chmod 755 my merge/root for it to go back to normal and include this
> directory in the file system image, otherwise it would be omitted.
>
> My error was from bin/Ltibutils.pm
>
> find . -perm -444 ! -type b ! -type c -print0 | cpio -p0d --quiet
> /home/aaron/0324/ltib/rootfs.tmp
> find: `./root': Permission denied
>
> the first find was an echo of the real find.  I already worked around it
> with the 755 thing, so I'm not stuck, but could you clarify this a little?
>
> Aaron
>
>
> _______________________________________________
> LTIB home page: http://ltib.org
>
> Ltib mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/ltib
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]