The distribution is an Ubuntu server running the 2.6.35-30 Linux kernel.
I would like to have a directory that sits completely in memory. Is this possible without root privileges?
Linux provides a tmpfs device which any user can use,
Simply create a directory in
This is a RAM backed device, so what's there is in memory by default. You can create any directories you need inside
Naturally, files placed here will not survive a reboot, and if your machine starts swapping,
The Solaris parallel to
OpenBSD has the capability to use a memory based mount as well, but does not have one available by default. The mount_mfs command is availabe to the super user.
I'm not sure about other *BSDs.
Your system may have one already available; recent Linux systems based on Glibc always have a tmpfs mounted on
If your system doesn't have one or it's too small, then a filesystem not mounted by root pretty much means FUSE. On Ubuntu, you need to be in the
In general, no, filesystems can only be mounted by root. If you allow a user to place filesystems arbitrarily, that's essentially giving them root. (Easy way: mount one over /etc, put your own passwd and shadow there, su with the new root password you just created, unmount)
If you want a tmpfs at a particular location, you could add it to
If users need arbitrary tmpfs's, then you have a couple options: