#3771 - Better "excessive file permissions" detection

Identifier #3771
Issue type Feature request or suggestion
Title Better "excessive file permissions" detection
Status Completed
Tags

Roadmap: v11 (custom)

Handling member Chris Graham
Addon core_upgrader
Description The excessive file permissions checker currently only checks when non-suEXEC servers have files/directories chmodded as world-writable that don't need to be (hence lowering security as any other web server user may potentially have write access).

Actually there's a more important check we should do. For suEXEC servers, find any files/directories that are world-writable - none should be. Some Apache servers will give 500 errors if PHP files being called up are.

Really we might want to approach this in an absolutist way - knowing, for a particular server's architecture, what every files permissions should be - and correcting it to that. There's no need for example to have executable set on PHP files, unless the server needs that.
Steps to reproduce

Additional information I changed the current test line for a user, to hack the main new use case described here, and it worked...

if ((php_function_allowed('posix_getuid')) && ((fileperms($dir . $file) & 2) != 0) && (fileowner($dir . $file) == posix_getuid())) {
Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated