I’ve modified the PHP wrapper that my server’s running today, so I’ve been paying particular attention to file permissions. It appears that all files uploaded via EE are getting permissions of 777, which already sets off alarm bells, but looking at EE’s code I can’t help but think this is a bug.
In _upload_file() within Filemanager.php the following code is being used:
@chmod($file['full_path'], DIR_WRITE_MODE);Given that $file[‘full_path’] is the path to the newly uploaded file and not the containing directory, shouldn’t EE be using FILE_WRITE_MODE here instead?
Just to be clear, I’m not in need of support here per-se, but equally I’m not feeling quite confident enough to post this as a bug report. Can anyone weigh in on this? Thanks.