User's .cagefs/tmp/ directory filling with thousands of session files
Forum
  1. Forums
  2. CloudLinux and Control Panels
  3. CloudLinux and cPanel
  1. Scott Neader
  2. 06.10.2015
  3.  Subscribe via email
I was looking into a disk usage issue for a customer and found that they had nearly 1 GB of  temporary session files stored in /home/user/.cagefs/tmp/

In fact, there are currently nearly 197,000 of these files... some with today's date... some over 4 months old.  The files all look like this:

-rw------- 1 username username       75 Jul  5 15:56 sess_fffcd441337ca45a72f1fd314756ec51
-rw------- 1 username username       96 Jul 20 16:07 sess_fffce04195a58c07cff8a0be35a7be03
-rw------- 1 username username       96 Aug 23 08:25 sess_fffd1e490ef386faf741e79f6ee3f964
-rw------- 1 username username       75 Jun 14 00:25 sess_fffd35f8eb321c6e034c02e4cafd6ce9
-rw------- 1 username username       75 Oct  1 23:43 sess_fffd8c5e81f81b1bccad9c06d0b1fffa


Sure, i can clear these files out, but this is masking a larger problem.

1) Why are these files here?
2) Should they be here?
3) How can they be automatically purged to stop this from happening to this or other customers in the future?

Thanks for any insight you can provide.

- Scott
Rate this post:
  1. 10.11.2015 11:11:24
  2. # 1
Mike Vasquez Accepted Answer
Posts: 6
Joined: 29.06.2012
0
Votes
Undo
Open /usr/share/cagefs/cagefsctl.py and find def tmpwatch():
Replace string (line 3922 in cagefs-5.5-6.4.el6.cloudlinux.x86_64):
subprocess.call(cmd, stderr=dev_null, stdout=dev_null)
with this code, saving correct identing for python:
if VERBOSE:
     subprocess.call(cmd)
else:
     subprocess.call(cmd, stderr=dev_null, stdout=dev_null)
Then run:
cagefsctl -v --tmpwatch
Output of this command should help you to fix the problem.
  1. 10.11.2015 12:11:24
  2. # 2
Scott Neader Accepted Answer
Posts: 89
Joined: 12.06.2014
0
Votes
Undo
Bogdan, this is a known bug.  See Ticket: #JUX-649-26138


Hello!

I have found a bug in cagefsctl --tmpwatch command
It will be fixed in the next release of CageFS

Thank you for reporting the issue


Anton Volkov,
Developer,
Cloud Linux Inc.

This problem is STILL not fixed, by the way.  I do not know what release of "CageFS" will fix this... do you know?

- Scott
  1. 10.11.2015 13:11:20
  2. # 3
Mike Vasquez Accepted Answer
Posts: 6
Joined: 29.06.2012
0
Votes
Undo
Of course before such ugly way of detecting the problem, you should backup original file and after debugging, you should return it back.
In our case, after enabling \"verbose\" of tmpwatch we found out two problems:
- wrong permissions on user\'s home directory, /home/username
- wrong permissions and owner on ~username/.cagefs/tmp
After fixing it - tmpwatch works perfect.

Bogdan, it\'d be good to implement verbosing for tmpwatch and catch exit code of running tmpwatch in user\'s lve.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar,pdf
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Captcha
To protect the site from bots and unauthorized scripts, we require that you enter the captcha codes below before posting your question.