Re: /proc/net permissions

From: Nicholas Dronen (ndronen@frii.com)
Date: Mon Apr 03 2000 - 20:07:06 EST


On Mon, Apr 03, 2000 at 10:38:15PM +0200, Frank v Waveren wrote:
> On Mon, Apr 03, 2000 at 08:13:56PM +0100, Konstandinos A. Saipas wrote:
> > 0 dr-xr-x--- 3 root root 0 Apr 3 20:09 ./
>
> That's weird, I'm running 2.2.14 with kerneli patch:
> dr-xr-xr-x 3 root root 0 Apr 3 22:36 /proc/net/
>
> > By changing the permissions of /proc/net manually to 555(maybe not the
> > best idea I could have) everything worked for a while, but after some
> > time, the permissions changed to the original state of 550.
>
> Manually as in chmod, or manually as in changing the source, recompiling
> and rebooting? AFAIK /proc files aren't chmoddable. Anybody care to confirm
> this?

I posted a message to the effect that at least /proc/net
is chmoddable a while back. Here's the evidence again.

$ cd /proc/net
$ ls -ld
dr-xr-xr-x 3 root root 0 Apr 3 19:02 .
$ sudo chmod 777 .
$ ls -ld
drwxrwxrwx 3 root root 0 Apr 3 19:02 .

One funny thing I noticed is that the permissions on /proc/net
stay as they are chmodded until your shells cwd no longer includes
/proc/net.

A demonstration.

$ cd rpc
$ ls -ld ../
drwxrwxrwx 3 root root 0 Apr 3 19:02 ../
$ cd ../
$ pwd
/proc/net
$ ls -ld
drwxrwxrwx 3 root root 0 Apr 3 19:02 .
$ cd ../
$ ls -ld net
dr-xr-xr-x 3 root root 0 Apr 3 19:04 net

$ ./ver_linux
-- Versions installed: (if some fields are empty or look
-- unusual then possibly you have very old versions)
Linux sahara 2.3.40 #1 Sun Jan 23 16:29:18 MST 2000 i586 unknown
Kernel modules 2.3.10
Gnu C 2.95.2
Binutils 2.9.5.0.31
Linux C Library 2.1.3
Dynamic linker ldd: version 1.9.11
Procps .
Mount 2.10f
Net-tools 2.05
Kbd 0.96
Sh-utils 2.0
Modules Loaded ppp_deflate bsd_comp sb uart401 sound soundlow soundcore ne2k-pci 8390 ppp_async ppp_generic slhc

+---------------------------------------------------------------+
| When you really look for me, you will see me instantly -- |
| you will find me in the tiniest house of time. |
| - Kabir |
+---------------------------------------------------------------+
| nick dronen (unsigned char *) "ndronen at frii dot com" |
i+--------------------------------------------------------------+

-
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/



This archive was generated by hypermail 2b29 : Fri Apr 07 2000 - 21:00:11 EST