Can i safelly noexec /tmp directory?
Hello, on a WHM server (its virtual server on openvz)
can i safelly execute these commands?
add to /etc/fstab:
[QUOTE]none /tmp tmpfs nodev,nosuid,noexec 0 0
then mount: [QUOTE]mount -t tmpfs -o noexec,nosuid tmpfs /tmp
then veriffy: [QUOTE]df -h
will this also make /tmp go into RAM instead into disk?
then mount: [QUOTE]mount -t tmpfs -o noexec,nosuid tmpfs /tmp
then veriffy: [QUOTE]df -h
will this also make /tmp go into RAM instead into disk?
-
Run cat /proc/mtab to check if the changes saved in RAM. If you make the changes in fstab and then mount tmpfs via command then changes should be saved in disk as well or when you reboot server next time they will read from fstab. 0 -
Hello :) To answer the overall question, yes, it's normal to set the /tmp partition to "noexec" mode. It's configured this way by default on most systems. Thank you. 0
Please sign in to leave a comment.
Comments
2 comments