Re: [Yaffs] Permission denied when non-root

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Karl Olsen
Date:  
To: yaffs
Subject: Re: [Yaffs] Permission denied when non-root
---- Original Message ----
From: "Luc Van Oostenryck" <>
To: <>
Sent: Sunday, February 06, 2005 2:23 PM
Subject: Re: [Yaffs] Permission denied when non-root

> Karl Olsen wrote:


>> Everything works fine when I'm root, and I can run Busybox commands
>> and read and write files. But when I do a "su karl" it says:
>>
>> / # su karl
>> su: cannot run /bin/sh: Permission denied
>>
>> Does anybody know if this problem can be related to Yaffs? Does the
>> Yaffs filesystem have (hidden) mount options that can deny execution for
>> non-root?
>
> Yes and no, the default permissions for yaffs root directory is 0666
> thus the directory is not accessible for non root.
> Changing the permissions of the root dir to 0777 (or better to 0755)
> cure the problem until the next reboot.
> The following patch solve the problem permanently:
> ----
> diff -r1.14 yportenv.h
> 102c102
> < #define YAFFS_ROOT_MODE                               0666
> ---
>> #define YAFFS_ROOT_MODE                               0755
> ----


Thanks! I have added "chmod 755 /" to my startup script, and now it works
beautifully.

Regards,
Karl Olsen