Find the answer to your Linux question:
Results 1 to 3 of 3
Hello forum, is there a way to make the /proc filesystem writeable ? With aufs or unionfs i can't join the /proc filesystem with a writable directory directly. But i ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    10

    Make /proc writeable - possible ?

    Hello forum,

    is there a way to make the /proc filesystem writeable ?
    With aufs or unionfs i can't join the /proc filesystem with a writable directory directly. But i think it should work by using one of this filesystems.

    If i try to join two dirs write-proc and virtual-proc
    Code:
    mount -v -t aufs -o dirs=/tmp/write-proc/:/tmp/virtual-proc/ none /tmp/joined-proc/
    and afterwards make a bind mount /proc to virtual-proc
    Code:
    mount --bind /proc /tmp/virtual-proc/
    i can't see any change in /tmp/joined-proc.

    It would be very nice if someone could help me.

    Thank you very much

  2. #2
    Linux Newbie
    Join Date
    Apr 2007
    Posts
    119
    Why would you want to do this?

  3. #3
    Just Joined!
    Join Date
    Apr 2010
    Posts
    10
    Hello markcole,

    The problem is a little bit special and complicated, but i try to summarize it.

    Some Processes like the ConsoleKit Daemon for example try to determine the pid of a process which connects himself to the dbus.
    Afterwards it reads the associated /proc/<pid>/environ file to get the environment variables for this process.

    The problem is that a process who connects to the dbus is not necessarily the one who uses the connection. If you use a dbus-proxy for example, the process who wants a dbus connection, connects to the proxy. The proxy sends a request to a server-process, which passes a descriptor (fd of the dbus-connection established) back to the proxy. The proxy now makes the transfer between the passed fd and the fd of the process who established the connection to the proxy. The problem is that the process who connects to the dbus (started by the server process) is already dead but the ConsoleKit Daemon receives its pid (GetConnectionUnixProcessID) because this was the process who established the connection to /var/run/dbus/system_bus_socket.

    A solution is to keep the process who establish the dbus-connection (which is started by the server process) alive and make a bind mount from /proc/<pid of process who connects to proxy>/environ to /proc/<pid of process who connects to dbus>/environ that ConsoleKit reads the right environ file. This works fine but there are too many processes who just sleeps until the session ends.

    I thought it would be a better solution if there is a way to fake /proc, that it is possible to create a symlink or something like this who point tho the correct /proc/<pid> entry. (if possible ?? )


    Thank you
    Julian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...