Increasing number of inodes for /tmp using securetmp script

kavos1332

Active Member
Dec 17, 2012
40
0
6
cPanel Access Level
Root Administrator
Hi All,

My server is hardened by using cPanel's securetmp script. I have installed Nginx using Nginx Admin plugin. My problem is every few days, Nginx fails to processes some phppages and states in its logs that no space is left in /tmp. However in such cases, "df -h" shows that a lot of disk space is left on the tmpDSK which is mounted under /tmp. So I think no inode is left on the device. So I would like to mount /tmp with some more inodes. As I know tmpDSK is mounted on boot so there should be a setting that can control number od inodes.

I look forward for your helpful answers.
TIA
 

24x7server

Well-Known Member
Apr 17, 2013
1,912
99
78
India
cPanel Access Level
Root Administrator
Twitter
You will have to setup the cron job to clean /tmp directory, Following cron will automatically cleanup your /tmp/nginx_client directory so that you will not get any issues with tmp inodes.

Code:
0 */1 * * * /usr/sbin/tmpwatch -am 1 /tmp/nginx_client
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

I suggest reviewing the /tmp partition to verify what's taking up the available inodes. It's possible that you need to setup a tmpwatch script as referenced in the previous post to automatically clean up older files.

Thank you.