Apache httpd buffering to /tmp without cleanup at the end
During a file upload using an HTML form as "multipart/form-data" httpd service buffer the request body and writes two files to /tmp folder
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 31961 user 17u REG 7,0 7339708 3583 /tmp/20240111-111340-ZZ-xRBZyM-dqClMGsn2_GQAAAAo-file-WCxpBl
httpd 31961 user 20u REG 7,0 7340032 3585 /tmp/20240111-111343-ZZ-xRBZyM-dqClMGsn2_GQAAAAo-request_body-UhKAPP
Problem 1: When the request is done the second file (-request_body-
) is deleted but the first (-file-
) not deleted.
problem 2: The /tmp folder not cleanup automatically. Some process accesses the files once a day which prevents them from being deleted by systemd-tmpfiles
$ stat /tmp/20240111-111340-ZZ-xRBZyM-dqClMGsn2_GQAAAAo-file-WCxpBl
File: ‘/tmp/20240111-111340-ZZ-xRBZyM-dqClMGsn2_GQAAAAo-file-WCxpBl’
Size: 15728640 Blocks: 30760 IO Block: 4096 regular file
Device: 700h/1792d Inode: 3583 Links: 1
Access: (0600/-rw-------) Uid: ( 1006/user) Gid: ( 1008/user)
Context: system_u:object_r:tmp_t:s0
Access: 2024-01-12 00:05:02.576917366 +0200
Modify: 2024-01-11 11:18:54.623436830 +0200
Change: 2024-01-11 11:18:54.623436830 +0200
Birth: -
The `systemd-tmpfiles` job return "modify time ... IST is too new."
Does anyone have an idea how to solve these problems?
-
Hey there! This doesn't sound like it would be related to the cPanel tools on the server, so you may get better answers to this question posting in a more general Apache-centric place.
Does this issue only happen with one specific form? If so, I'm wondering if the form itself would be the most likely issue.
0 -
It seems that this is a cPanel problem because apparently it is an incorrect configuration setting that comes with the panel by default.
The problem occurs in every form for example like this
<form method="post" enctype="multipart/form-data"> <input name="file" type="file" /><br /> <input type="submit" value="SUbmit" /> </form>
0 -
hi. we're having this exact same issue. it's definitely cpanel-related since it started happening recently without any changes on our side.
today we ran out of space and i had to delete some of those files.
can you investigate?
0 -
Boariu Alexandru - it would likely be best to open a ticket on this so we can test this on a system where the issue is happening.
0
Please sign in to leave a comment.
Comments
4 comments