When I try to upload a file with a file field, Drupal creates a sites/default/files/2023-10 directory, but can't upload the file. I see this validation error in the UI: "File upload error. Could not move uploaded file." And I see a similar notice in the Drupal log: "Upload error. Could not move uploaded file test.txt to destination public://2023-10/test.txt."
In admin/config/media/file-system, my public file system path is set to sites/default/files. There are no errors on the status page indicating a permissions problem.
If I delete the files directory altogether, and then save the form at admin/config/media/file-system, Drupal creates sites/default/files and sites/default/files/php.
What are the possible reasons Drupal can create directories inside of sites/default/files, but can't upload files?
Drupal version: 9.5.11
Web server: IIS 10