Massive GL-S1300 stock to openwrt firmware

I’ve compiled uboot-envtools to be able to disable de auto update once finished, but i get …

root@XXXX:/# fw_setenv tftp_upgrade
Can't open /dev/mtd5: Permission denied
Error: can't write fw_env to flash

I’ve added the same fw_env.config file that is in the stock firmware.

root@XXXX:/# cat /etc/fw_env.config
/dev/mtd5 0x0 0x00010000 0x00010000 1

What is missing?

Thanks.