Remount /tmp with exec permission

Remounting /tmp With Execute Permission

 

On some cPanel servers, the /tmp partition is mounted with the noexec option as a security measure. If a script or application needs to execute files from /tmp, you can temporarily remount it with exec permission.

 

Temporarily Enable Exec on /tmp (root required):

mount -o remount,exec /tmp

 

Re-secure /tmp After You Are Done:

mount -o remount,noexec /tmp

 

When Is This Needed?

  • Some installers and package managers (like cPanel update scripts) temporarily need exec permission on /tmp
  • Certain PHP applications that write and execute temporary files in /tmp
  • MySQL database repairs that create temporary tables in /tmp

 

Always remount with noexec after the operation is complete. Leaving /tmp executable is a security risk as attackers often attempt to upload and execute malware in /tmp.

 

This requires root server access. Shared hosting customers should contact support if an application is failing due to /tmp restrictions.

  • 155 Users Found This Useful

Was this answer helpful?

Related Articles

error: db3 error(-) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery

error: db3 error(-) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery...

E Sysup: Needed system RPMs were not installed: yum-utils

When encountering the following:E Sysup: Needed system RPMs were not installed: yum-utils*****...

VPS Time not Correct with Time Server

VPS Time Not Syncing With Time Server   If the time on your VPS is incorrect or drifting,...

FSCK Options and Maintenance

Provided below are some useful commands pertaining to FSCK. Update commands to your environment /...

Recursive chmod / Permission Change Across Directories for a File Type

Recursive Permission Changes Across Directories   To change permissions recursively across...



Save 30% on web hosting - Use coupon code Hosting30