Mount the /tmp partition with ‘noexec’ and ‘nosuid’

cd /var

dd if=/dev/zero of=tmpMnt bs=1024 count=2097152

mkfs.ext3 -j /var/tmpMnt

nano /etc/fstab

/var/tmpMnt /tmp ext3 loop,rw,noexec,nosuid,nodev 0 0

cp -Rp /tmp /tmp-backup

rm -rf /tmp

mkdir /tmp

mount -o loop,noexec,nosuid,rw /var/tmpMnt /tmp

chmod 0777 /tmp

chown root:root /tmp

cp -Rp /tmp-backup/* /tmp/

rm -rf /tmp-backup

rm -rf /var/tmp/

ln -s /tmp/ /var/tmp

# mount

Look for: “/dev/sdaX on /tmp type ext3 (rw,noexec,nosuid)”

Restart anyservices using TMP

service clamd restart

service httpd restart

DONE!