On 2007-09-24 10:14 -0400, Ian McDonnell wrote:
> On Monday 24 September 2007 09:01, Renaud Cerrato wrote:
> > Using Linux 2.6.21 on AT91RM9260 ARM machine with YAFFS2
> > support: when mounting, permissions & ownerships are not
> > transfered ?
>
> Transferred from where?
>
> > # ls -la /etc | grep config
> > drwxr-xr-x 1 root other 2048 Sep 24 11:59 config
> > # mount -t yaffs2 /dev/mtdblock3 /etc/config
> > yaffs: dev is 32505859 name is "mtdblock3"
> > yaffs: passed flags ""
> > yaffs: Attempting MTD mount on 31.3, "mtdblock3"
> > yaffs: restored from checkpoint
> > # ls -la /etc | grep config
> > drw-rw-rw- 1 root root 2048 Sep 24 12:57 config
>
> Yaffs has some crazy defaults for 'mode' on root and lost+found
> dirs on a new filesystem. AFAIK once you set them (chmod) they
> are persistant.
They don't seem to be. Not reliably on our boards anyway. We have to
have a chmod 755 in the init scripts otherwise all sorts of mysterious
breakage occurs from programs that can't read /etc/passwd or /var/foo
(more accurately I think they can't enumerate directories).
The setting sometimes sticks. I have not yet been able to determine
why it sometimes gets lost and why it sometimes doesn't. It could
easily be an interaction with our yaffs-aware bootloader.
> You can fix the default: see YAFFS_ROOT_MODE
> and other defines in yportenv.h, 0755 is better value.
That does sound like a very good idea.
Wookey
--
Principal hats: Balloonz - Toby Churchill - Aleph One - Debian
http://wookware.org/