Bug in PHP moves uploads with wrong permissions
com2 - November 28, 2008 - 18:32
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | file system |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
This is really sort of a bug in PHP as discussed here. In the discussion a suggestion is done to always do a chmod after using move_uploaded_file(). In Drupal this advice however is ignored, causing permission problems when files are uploaded with the faulty versions of PHP. The moved files get permission 600 and become therefore unreadable except for Apache. I suggest chmod 644 is added in the code.

#1
Please search before opening an issue. This is a duplicate of #203204: Uploaded files have the permissions set to 600, and IMHO, this is a PHP bug Drupal should not have to workaround.