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

Owner problems in JFFS





Hi,

I've noticed that when I create a jffs image on my
linux machine, mkfs.jffs gives the files in the jffs
image the same owner as it has on my linux machine.
This is not that good, since I make my jffs images
(and everything else) as a normal user. So if I
do a:
"ls -l /mnt/flash/etc" (or "ls -l /etc/")
it will look like this:
..
-rw-r--r--  1 276      users          74  Jan 04 2001  passwd
-rw-r--r--  1 276      users          80  Jan 04 2001  profile
..
I do not know if this is a feature or a bug. But I would prefer 
that root:root owns all the files in the /etc directory.

I use mkfs.jffs:
/* $Id: mkfs.jffs.c,v 1.14 2000/07/18 17:46:27 finn Exp $  */

I want root to own every file in my jffs image, so I did
change the following lines in mkfs.jffs.c
From: (Line 394-395)
f.inode.uid =
st.st_uid;                                                    
f.inode.gid = st.st_gid;
To:
f.inode.uid = 0;                                                    
f.inode.gid = 0;

I'm happy with that, but maybe in the future it would maybe be
a good idea to support meta files like genromfs does.
I.e. to have a "jffs_meta.txt" where you can set the owners and 
such things.


/Jonas

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com