0

In one of the websites on production, when Drupal writes on the temporary directory, it randomly stops working with the following error, even though the permissions are set correctly, and there is enough space.

Temporary file data could not be written

The temporary directory is set to the DRUPAL_ROOT/sites/default/files/tmp directory.

Removing the content of the temporary directory solves the problem, but it came back again. I can't debug the reason.

How can I fix this issue?

4
  • Have you upgraded version of Drupal core? Mar 17, 2022 at 19:15
  • 2
    Is there an operational reason on that site for putting the temporary directory where it is publicly accessible over the web? Instructions for that configuration are "This directory must be absolute, outside of the Drupal installation directory and not accessible over the web."
    – cilefen
    Mar 17, 2022 at 19:17
  • @usmanjutt84 Drupal is the latest version Mar 20, 2022 at 8:46
  • @cilefen There was a reason before, but currently, no, I actually set the temporary folder to the default '/tmp' now, but it happened today again. I'm still not sure why. Mar 20, 2022 at 8:47

1 Answer 1

1

I solved the issue, turns out that there was a user quota with a maximum amount of blocks that can be written.

Use this command to check if there is a quota.

sudo quota -vs USER

Not the answer you're looking for? Browse other questions tagged or ask your own question.