Problems with CageFS temp files buildup

2 posts / 0 new
Last post
bwarters
Problems with CageFS temp files buildup

My new site host for an old and many times upgraded CWIS installation uses CageFS to separate users. Unfortunately, a side effect for me has been a build up of uncleared temp files in the .cagefs directory area. I get directorie with names like ScoutAF_01209498ff6da5a78b50d5f287adafc7 filled with session files that accumulate until i get a warning that my site will no longer be backed up due to a too high inode count. 

Any advice on how to ward off this problem? I wondered if there was a temp files url stored somewhere that might be adjusted to solve this. Alternatively, some kind of cron job tips?

Thanks.

chalpin
Re: Problems with CageFS temp files buildup

CWIS creates its own subdirectory within PHP's session storage directory so that multiple CWIS sites can be installed on the same host without unintentionally sharing session data. That's the source of these directories.  The path used for these directories is determined by PHP's session.save_path configuration directive. If you wanted to adjust where CWIS stores these files, it should suffice to change your session.save_path.

However, CWIS also cleans these directories (in CWIS 3.2.0, see lib/ScoutLib/ApplicationFramework.php line 4101).  So, these files shouldn't be building up in the way you're describing.  We haven't tested CWIS under CageFS, so it's entirely possible that our session garbage collection is being foiled by the "cage".  In that case, you might consider setting up a cronjob that runs something like "find /path/to/folder -type f -mtime +30 -delete".  That command will delete any files older than 30 days from the specified path.  Your version of find may differ slightly in the flags it accepts depending on your operating system; 'man find' on your server will be the definitive guide.