Hello,
I've taken out a new VPS that I'm having a go at "securing" myself.
I used this forum to assist me with things I'm unsure about and one of those was securing the /tmp.
I found a thread here that gave a sort of guide that detailed how to secure this but I'm having issues and not sure how to proceed.
mount -o loop,noexec,nosuid,nodev,rw /var/tmpMnt /tmp did not work so altered it to:
mount -t tmpfs -o noexec,nosuid tmpfs /tmp
This appeared to work correctly so I proceeded.
cp -a /var/tmp/.??* /var/tmp/* /tmp causes an error for me, this is as follows:
I have tried finding/understanding a solution to this on Google and here on the forum but have been unable.
I'd appreciate if someone could help me out as I am unsure how I fix and/or undo what I've done!
Thanks
I've taken out a new VPS that I'm having a go at "securing" myself.
I used this forum to assist me with things I'm unsure about and one of those was securing the /tmp.
I found a thread here that gave a sort of guide that detailed how to secure this but I'm having issues and not sure how to proceed.
Code:
dd if=/dev/zero of=/var/tmpMnt bs=1024 count=1000000
/sbin/mke2fs /var/tmpMnt
cd /
cp -a /tmp /tmp_backup
rm -rf /tmp/.??* /tmp/*
[B]mount -o loop,noexec,nosuid,nodev,rw /var/tmpMnt /tmp [/B] <----------
mount -o loop,noexec,nosuid,nodev,rw /var/tmpMnt /tmp did not work so altered it to:
mount -t tmpfs -o noexec,nosuid tmpfs /tmp
This appeared to work correctly so I proceeded.
Code:
chmod 1777 /tmp
cp -a /tmp_backup/.??* /tmp_backup/* /tmp/
rm -rf /tmp_backup
echo "/var/tmpMnt /tmp ext2 loop,noexec,nosuid,nodev,rw 0 0" >> /etc/fstab
[B]cp -a /var/tmp/.??* /var/tmp/* /tmp[/B]
cp -a /var/tmp/.??* /var/tmp/* /tmp causes an error for me, this is as follows:
****cp: cannot stat `/var/tmp/.??*': No such file or directory
cp: cannot stat `/var/tmp/*': No such file or directory**********
I have tried finding/understanding a solution to this on Google and here on the forum but have been unable.
I'd appreciate if someone could help me out as I am unsure how I fix and/or undo what I've done!
Thanks