• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Plesk PHP Session Cleanup unable to delete files from /var/lib/php/session

NimaMa

New Pleskian
I'm using 11.0.9 CentOS 6 110120608.16

All session files on my server are stored in the folder /var/lib/php/session

The folder has the following permissions set:

drwx-wx-wt 2 root root 548864 Apr 10 20:09 session

But all session files inside that folder only have rw permissions for there apache user exclusively

So I think the cron configured in /etc/cron.hourly/plesk-php-cleanuper is unable to actually perform the session cleanup, hence the size of the folder continues to grow and at this point every time the job runs and combs through all files the I/O weight goes to 100% and slows my entire server down to the point where the applications hosted on it are completely unaccessible.

How can I resolve this matter?
 
Yes I applied that change a while ago but I am struggling to understand what that has to do with the issue I outlined above? Unfortunately it doesn't matter whether there's one file or 1,000,000 files in the session folder. If the file is not writeable, then the root user won't be able to delete it. Or am I missing something here?
 
So I've tested this a bit more now and I am completely puzzled why there's such silence on this issue. The cleanup task literally does not do ANYTHING. I ran it manually several times now, I even ran it as sudo as the apache user. The number of files in the session folder keeps on growing and growing and there seems to be nothing holding it back.
 
OK, I figured out what the problem is I think. I changed the permissions on the folder /var/lib/php/sessions from the official Plesk prescribed ones (1733) to 733 instead. Now the task is able to delete files in that folder as root user. The sticky bit explicitly prevents the root user from deleting other users' files, so I'm puzzled as to why Plesk is recommending that setting.
 
What sort of output of following command on your server

# getenforce

?
 
Back
Top