Portal Home > Knowledgebase > Articles Database > /scripts/securetmp --auto not running in vps openvz


/scripts/securetmp --auto not running in vps openvz




Posted by sasky, 07-27-2010, 04:35 PM
hi all how are u command /scripts/securetmp --auto not running on vps centos openvz I have a main server node How can I deal with this problem error If the loopback block device is built as a module, try running `modprobe loop` as root via ssh and running this script again. If the loopback block device is built into the kernel itself, you can ignore this message. *** Notice *** No working loopback device files found. Try running `modprobe loop` as root via ssh and running this script again.

Posted by PCS-Chris, 07-27-2010, 04:51 PM
That script is designed to make a seperate file-based partition, and mount that with noexec permissions. It is only compatible with Xen, KVM, Vmware, or a physical server because it relies on having a loopback device. You wont be able to use that script on OpenVZ, but there are ways to secure /tmp on OpenVZ.

Posted by sasky, 07-27-2010, 05:00 PM
What is the method of securing tmp openvz in New

Posted by Linuxsurgeon, 07-29-2010, 03:20 AM
You can do it by adding following entry in “/etc/fstab” save the file and reboot the VPS, now vps get mounted with “nosuid” and “noexec”

Posted by madaboutlinux, 07-29-2010, 05:11 AM
You can mount /tmp of a VPS with nobind,noexec from the main node as well as from within the VPS. From the host server: OR from within the VPS:

Posted by JohnCS, 07-29-2010, 10:49 AM
Under VPS edit /etc/fstab, nano /etc/fstab and insert below lines, mount /dev/loop0 -o noexec,nosuid,rw /dev/tmpFS /tmp mount /dev/loop0 /dev/tmpFS -o noexec,nosuid,rw Now run command below, mount -obind,nosuid,noexec,nodev,rw /usr/tmp /tmp You /tmp is mounted now with noexec

Posted by vps_ghost, 07-29-2010, 11:30 AM
mount tmpfs will occupancy your memory, maybe be care to make a /tmp with a tmpFS for serure season but... cause your memory out of capacity, when your VPS have a few ram? Just a little comment: When you want to use some trick to tunning something, and actually, you don't understand it, just saw some one write a guide or howto, and you do the same thing... maybe do nothing is better than do something wrong. Last edited by vps_ghost; 07-29-2010 at 11:40 AM.

Posted by chasebug, 08-09-2010, 03:33 AM
So mounting the tmp as partition will take up memory? How much memory? For example if tmp is 1G size?

Posted by vps_ghost, 08-09-2010, 05:42 AM
not /tmp, is tmpFS. these two are different.

Posted by rivet, 03-23-2012, 09:15 PM
Spent 3 hours googling to solve CSF message in OpenVZ: /tmp should be mounted as a separate filesystem with the noexec,nosuid options set I found this and it worked, thanks to linux2k. Ok, now just 4 more issues to get a perfect 36.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read