0

In our environment we have linux developer PCs and several embedded boards. The embedded boards are booted from an image. Those image files should be created/modified on the developer PCs. Mounting is no problem:

mount /scratch/image.img /scratch/mounted-image -o loop,user 

would be enough.

The problem is users can mount it, but not access files that are belonging to root in the image (the image is usually ext2). What I need is a way that everything in that mounted dir, that belongs to uid 0, is mapped to a different uid and vice-versa.

I googled already for something, but the results where disappointing (e.g. only something like fakeroot, which is not suitable in such a situation; of course sudo is also not possible in this situation).

  • This could be solved with a fuse-based "translator". I actually created something somewhat similar a while ago. It would need some work to do what you want. I think I know you. If so, you shall be able to find me in IRC. – Juliane Holzt Sep 30 '13 at 21:36
-1

Why are these images owned by root? All of your problems are caused by this issue. Simply chown the files to a proper owner and grant permissions in the traditional unix style.

| improve this answer | |
  • No, not the images are owned by root - but the files within the images (at least some). And as they are usually boot images, they have the usual owner - e.g. /etc/passwd (in the image) is owned by root. – flolo Sep 30 '13 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.