Forum Moderators: bakedjake

Message Too Old, No Replies

/tmp files suddenly in /tmp/system-d-private-*/tmp

         

csdude55

4:59 am on Oct 16, 2023 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Fun new problem!

On Thursday, I had a warning that I'm at 98% of my inode usage, and upon inspection I found that all of the inodes are in /tmp/system-d-private-*/tmp.

I used tmpwatch to empty it, but it filled up again after a day. That's when I discovered that all of my sess_ files (for PHP sessions) are in this directory now, instead of the regular /tmp directory.

Worse, there doesn't appear to be any cleanup. I found that tmp.conf explicitly denies a cleanup to this directory!

X /tmp/systemd-private-%b-*/tmp


I've gone through every setting I can find in an attempt to make those session files go back to the /tmp directory, but nothing is working. And I can't even write a cron to run tmpwatch, because the * changes every time I reboot :-/ So I'm stuck manually running tmpwatch at least daily.

I found that this is the "preferred" method to delete the sess_ files instead of using tmpwatch, but I don't know how to make it into a cron:

find /tmp/systemd-private*php-fpm.service* -name sess_* ! -mtime -1 -exec rm -f '{}' \;


Any suggestions on why the sudden change to this directory, and/or how to change it back?