On Thu, 14 May 2009, cg wrote:
> hello, i write a program like the example_fh.c
> this program's mount point is /tmp/fuse
> when i cat /tmp/fuse/dev/urandom, Permission denied even if i am root.
> and if i chroot /tmp/fuse, of course i got errors when bash tried to
> open /dev/urandom.
> after all, chroot works.
> and after chroot, 'ps' cannot work, it reads '/proc/xxx/stat' and got
> i have tried the stable and pre-release versions.
> gdb shows that my program didn't catch the 'open' when 'cat
> nither the 'read' when reading '/proc/xx/stat' after 'chroot'
> i want another program to run in chroot env,
> anything i need to do ?
Use the "-odev" option.
Or after mounting do a "mount -o remount,dev,nosuid /tmp/fuse".