Mounting tmp directory with noexec nosuid on vps

A quick note on mounting /tmp directory with noexec nosuid on vps or Linux. For security reason, a VPS have to mount /tmp directory with noexec, nosuid. Note that the following command need to re-issue when VPS is rebooted. To make it permanent, append it in /etc/fstab.

  • noexec – preventing process(es) from executing exec system call
  • suid – SUID stands for set user id. When a SUID file executed, the process which runs it is granted access to system resources based on the user who owns the file and not the user who created the process.
  • Here are details steps.

REF: