Normally proc files are either read-only or read-write.  I had to look
this up since I have not had to use this before.

register is owned by root on my system
--w------- 1 root root 0 Oct 24 14:49 register

found this in kernel doc's
"To actually register a new binary type, you have to set up a string
looking like
:name:type:offset:magic:mask:interpreter:flags (where you can choose
the ':' upon
your needs) and echo it to /proc/sys/fs/binfmt_misc/register."

echo ':i386:M::\x7fELF\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03:\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfb\xff'
> /proc/sys/fs/binfmt_misc/register

So it makes sense that you can write or read to it as root.
Do you get a different result as a non-root user?

take care,
Brad
On Sun, Oct 28, 2012 at 3:20 PM, Jeff Moore <lists / ruby-forum.com> wrote:
> root@nail:/projects/proc_fs# uname -a
> Linux lian 2.6.32-44-generic #98-Ubuntu SMP Mon Sep 24 17:27:10 UTC 2012
> x86_64 GNU/Linux
>
> root@nail:/projects/proc_fs# ruby -v
> ruby 1.9.3p286 (2012-10-12 revision 37165) [x86_64-linux]
>
> root@nail:/projects/proc_fs# ls -al /proc/sys/fs/binfmt_misc/register
> --w------- 1 root root 0 2012-10-28 08:24
> /proc/sys/fs/binfmt_misc/register
>
> root@nail:/projects/proc_fs# irb
>
> irb(main):001:0> File.readable? '/proc/sys/fs/binfmt_misc/register'
> => true
>
> !?!?!?
>
> --
> Posted via http://www.ruby-forum.com/.
>