Find the answer to your Linux question:
Results 1 to 5 of 5
Hi I want to secure tmp folder and want to stop any execution there. Please guide me for that Thanks...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2011
    Posts
    66

    How to secure TMP folder?


    Hi

    I want to secure tmp folder and want to stop any execution there.

    Please guide me for that

    Thanks

  2. #2
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471
    I use a 1GB partition for my /tmp folder which I mount with nodev, nosuid, and noexec.

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    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

  4. #4
    Linux User Krendoshazin's Avatar
    Join Date
    Feb 2005
    Location
    London, England
    Posts
    471
    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.

  5. #5
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    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!

Posting Permissions

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