file_unmanaged_save_data() doesn't clean up its temp files

Created on 28 May 2015, over 9 years ago
Updated 30 July 2024, 4 months ago

In file_unmanaged_save_data() we create a temporary file, then move it into place. However, if the move fails, we end up with stale temp files. These are owned www-data:www-data and have mode 0600 by default, which can cause problems with backup scripts (i.e., Aegir) and such that won't be able to read them.

It's a pretty simple matter to check the return value of file_unmanaged_move(), and delete the temp file if the move failed. This function is identical in D7 and D8, but I'll post patches shortly for both.

๐Ÿ› Bug report
Status

Closed: outdated

Version

11.0 ๐Ÿ”ฅ

Component
File systemย  โ†’

Last updated about 2 hours ago

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada ergonlogic Montrรฉal, Quรฉbec ๐Ÿ‡จ๐Ÿ‡ฆ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024