Make WordPress Core

Opened 5 years ago

Last modified 4 years ago

#49078 new defect (bug)

Media Library permission checks in WordPress

Reported by: danskoya's profile danskoya Owned by:
Milestone: Awaiting Review Priority: normal
Severity: major Version: 5.3.2
Component: Media Keywords: reporter-feedback
Focuses: Cc:


If permissions to ~/uploads/ are not set correctly (or was modified in some manner), deleting media will only delete database references (item(s) will disappear from the Media Library view) but the actual files are not deleted.

However, when uploading media, permission errors are displayed.

This seems to be the the default behavior.

When was the last time you checked the contents of ~/uploads/ directory?

Change History (4)

#1 @danskoya
5 years ago


Apache HTTPD 2.4.41, OpenSSL 1.1.1d, (mod_php) PHP 7.4
WordPress 5.3.2 (no plugins, default 2019 theme, no hard-coded mods)

#2 @SergeyBiryukov
5 years ago

  • Component changed from General to Media

This ticket was mentioned in Slack in #core-media by pbiron. View the logs.

4 years ago

#4 @joemcgill
4 years ago

  • Keywords reporter-feedback added

Hi @danskoya, thanks for the report!

If permissions to ~/uploads/ are not set correctly

Are you referring to a use case where WordPress doesn't have rights to delete files from the filesystem? If so, what would you suggest should happen in this case—that a warning is shown in the admin that explains that the attachment was removed from the library but the file was not able to be deleted?

Note: See TracTickets for help on using tickets.