Re: access to proc filesystem from chrooted process

Richard B. Johnson (root@chaos.analogic.com)
Sun, 23 May 1999 21:18:15 -0400 (EDT)


On Fri, 21 May 1999, Peri Hankey wrote:

> Hi Riley
>
> It is possible to mount the proc file system onto a directory so that it is
> visible to chrooted processes. This can be useful, and should ideally be no more
> dangerous than allowing it to be visible to an unprivileged telnet account.
>
> Best Wishes
> Peri
>

Yes. The proc file-system can be mounted multably. You can check this
out if you have a ftp server installed. Presume it's home directory
is /home/ftp. As root do:

cd /home/ftp
mkdir proc
mount proc proc -t proc

Now execute anonymous ftp. You can `chdir` to what now looks like `/proc`
in the chrooted environment and get the directory.

I was able to download `get` cpuinfo even though the ftp message
said it was 0 bytes. The correct size (on my system) of 722 bytes
was received okay.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.6 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/