mtd permission denied

Aras Vaichas arasv at
Tue Mar 22 18:23:31 EST 2005

Aras Vaichas wrote:
> Mike Lee wrote:
>> Hi all
>>   i tried to flash_erase and other flash_* tools to my mtd device, the
>> return value is permission denied, but i am already root login. I have
>> selected MTD_CHAR and MTD_BLOCK in kernel.  Do i miss somethings?
> This is spookey, I just got the exact same problem at the same time(!)
> I'm trying to write data to my Dataflash device, but I get a "permission 
> denied" error whenever I try to fopen the file "/dev/mtd/2" to write the 
> data into it. I can read data from it with no problems.

Sorry to answer my owns post ... but Mike gave me a hint as to what the problem 

Mike had MTD_WRITEABLE set in the mask_flags for his partitions, so they were 

My "permission denied" was caused because I'd left the default Dataflash 
partition settings in at91_dataflash.c from the MTD backporting work I did last 
year. The default settings don't honour erase block boundaries and thus the 
partitions were being mounted "read only". Silly me didn't look at dmesg ...



More information about the linux-mtd mailing list