> For some reason, I was able to edit that file using emacs, even when
> echo wouldn't work.

maybe you wrote "sudo echo 0 > file" or something similar which perfoms the echo as root but the redirection as normal user ?