How to block tmp folders before they are full?

toplisek

Well-Known Member
Jan 7, 2010
286
23
68
There are clients and run applications and sometimes they fill up the temp. directory. How to prevent this as disc is full in some cases? Message sample: No space left on device...
 

Jeff Shotnik

Well-Known Member
Oct 10, 2012
61
0
6
Denver, Colorado, United States
cPanel Access Level
DataCenter Provider
You could adjust the ownership of /tmp so cpanel users can't write to it, but I don't recommend it as other services use /tmp as well (apache, mysql, webmail, etc). I would find who is using /tmp the most and adjust that users scripts to use a local tmp directory (/home/cpaneluser/tmp).
 

toplisek

Well-Known Member
Jan 7, 2010
286
23
68
You could adjust the ownership of /tmp so cpanel users can't write to it, but I don't recommend it as other services use /tmp as well (apache, mysql, webmail, etc). I would find who is using /tmp the most and adjust that users scripts to use a local tmp directory (/home/cpaneluser/tmp).
So, actually all Lynux hosting servers can be abused with such tmp folders as many users can work together on one server and block all others with financial consequence?
 

Jeff Shotnik

Well-Known Member
Oct 10, 2012
61
0
6
Denver, Colorado, United States
cPanel Access Level
DataCenter Provider
So, actually all Lynux hosting servers can be abused with such tmp folders as many users can work together on one server and block all others with financial consequence?
They could, yes, but probably won't happen. If you're that worried, you can always adjust the tmp location within the servers main php.ini (to a larger partition like /home/tmp), then adjust suphp.conf (if using suphp) so the setting can't be overwritten.