Hi
I want to secure tmp folder and want to stop any execution there.
Please guide me for that
Thanks
Printable View
Hi
I want to secure tmp folder and want to stop any execution there.
Please guide me for that
Thanks
I use a 1GB partition for my /tmp folder which I mount with nodev, nosuid, and noexec.
You can also make it a tmpfs filesystem, which means you don't use a physical partition on a hard disk, but instead RAM. But, as it is RAM, when you reboot, it is gone. But while it is there, it is FAST.
To test it, you can try e.g.:
Code:mkdir /tmp1
mount -t tmpfs tmpfs /tmp1 -o noexec,mode=1777
I used to put /tmp in RAM, but it doesn't really speed things up *that* much. It's just a place to store data while a program is working on it; it's not as if MPlayer transfers its files to /tmp before it plays them, it just plays them straight from the hard drive.
Yes, you're right, it doesn't magically speed up one's system. I should have been clear about that. I used it for speed when I had specific requirements of writing to disk as fast as possible (and RAID was not an option). In that scenario, I had a specific program whose output I had strict control over - in that case, tmpfs was extremely efficient in terms of speed!