Resource icon

[RESOLVED]: "A fatal error has occurred cannot write to cache directory /tmp"

A fatal error has occurred cannot write to cache directory /tmp

This is a rapid message occurs when you cross the inode limit. Now, its time to learn what is inode and why it has some limitations?

All the website runs with the help of hosting account. So, it needs a clear sketch to maintain few records isn't it. In that case, a typical type of data structure named as inode which is preferred to maintain the file information is set up with limitations. However inode increases or decreases it refers to folders and files count increases and decreases.

Eg:

1 inode = 1 folder & 1 file

2 inode = 2 folder & 2 file

Whenever, the inode limit goes over the count then you will get the message as

A fatal error has occurred

Cannot write to cache directory /home/username/tmp

Details have been logged for the administrator

What is the limitation for inode?

Few accounts have unlimited storage but the default number ranges only 2,00,000. If it exceeds over the limit then you will get the error message. The error causes you to stop receiving the mails. To ensure how many files in inode you can crosscheck in statistics section.

In one word, by deleting the number of folders and files and of course! The number of inode too get decreased.

What is the solution to get rid of inode limitations?

  • Your disk usage shouldn’t be filled. Make free space extremely..
  • Cross-check the inode account usage by commanding like below
Code:
echo "Detailed Inode usage for: $(pwd)" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n"
In technical terms, it is easy to reduce the inode usage:

Step 1: Check the folders and files which is useless. Just delete it.

Step 2: If you are Joomla user then you will get cache files more. Just delete the cache files then and there.

Step 3: Delete unwanted mails from the mailbox

Step 4: cPanel mail account has to be checked properly:

Code:
/home/username/mail/new
/home/username/mail/cur
Step 5: Delete spam mails regularly.

Step 6: Delete unwanted email account.

Atlast, try to remove .trash directory it may help you to resolve the inode limitation easily.
Author
bhawanisingh
Views
6,364
First release
Last update
Rating
0.00 star(s) 0 ratings
Top