- Issue created by @akhilavnair
- ๐ฎ๐ณIndia akhilavnair Kerala
Hi, Nothing happened, error happened by itself in that day for our client without any config/code change.
It means FileSystem::prepareDirectory returned false. The simplest explanation is that Drupal can't write to that location.
- ๐ฎ๐ณIndia akhilavnair Kerala
akhilavnair โ changed the visibility of the branch 3482750- to hidden.
- ๐ฎ๐ณIndia vinai_katiyar Delhi NCR
Hi @akhilavnair,
I tried to replicate the issue on my local machine using the specified PHP and Drupal versions with DDEV, but I was unable to reproduce it.
For both issues, it appears that the website cannot write to the destination file path, likely due to directory permission issues where it attempts to store uploaded images.
I would suggest please check the permission of the directory where the images are being uploaded.
- ๐ฎ๐ณIndia akhilavnair Kerala
Hi Vinai,
I have checked the permission, no issue in that, checked with Server Team and Networking team also. And via IMCE module its getting uploading so its not a folder permission issue. - ๐ต๐ญPhilippines cleavinjosh
Hi @akhilavnair,
I tried to replicate the issue but was unable to.
Please check and advise whether I missed something.
Thank you. - ๐ฎ๐ณIndia akhilavnair Kerala
Hi cleavinjosh,
For 1 site we have Drupal core update from 10.3.1 to 10.3.6, happened on last week of July 2024. But site's cache cleared, client was able to upload files also.
And we are using Nginx - Linux platform. - Status changed to Needs work
3 months ago 12:10pm 19 March 2025 - ๐ฎ๐ณIndia akhilavnair Kerala
Updating patch with media_library module changes
- First commit to issue fork.
- Merge request !11984Issue #3482750: File upload permission error showing in Media file field and... โ (Open) created by bhanu951
- ๐ฆ๐บAustralia kim.pepper ๐โโ๏ธ๐ฆ๐บSydney, Australia
Looks like permissions aren't set correctly in your file system. Did you follow the setup instructions here? https://www.drupal.org/docs/administering-a-drupal-site/security-in-drup... โ
- ๐ฎ๐ณIndia bhanu951
@kim.pepper
> Looks like permissions aren't set correctly in your file system
Even thought the permissions are set correctly it is happening randomly on couple of sites but not on all sites, its a multi-site setup.
Adding
|| FileSystemInterface::MODIFY_PERMISSIONS
to existing permissions is fixing it.And I believe there is no drawback in adding this or condition ?
@bhanu951 Good morning friend!
I just dropped to this problem and its being hard times.
Can you tell me, where should I add "FileSystemInterface::MODIFY_PERMISSIONS" ? It is in the config php file ? Or Azure web app ?
Thank you my friend!
- ๐บ๐ธUnited States smustgrave
Maybe a test case should be added to show the problem and why this fix is needed.