-
☆ A M B ☆
- 24,524 Posts
In most cases if your server is configured to use suPHP or some other kind of suexec (where the user is switched from the Apache user to the user who owns the PHP file being executed) the 644 for files and 755 for directories is required. The only thing I try to do is to make the two index.php files (the main one and the manager one) read-only, as well as the manager/includes/config.inc.php file. You may not be able to do that, again depending on your host’s configuration.
The other main point is to be careful when installing third-party add-ons that any files in the upload that are only used to provide the content for the element’s code in the Manager either not end with .php or be removed once you’ve created the element in the Manager and don’t need that content file any more.
When writing your own snippet or other element code, make sure you require an internal constant set in the Manager to be available so that the file can’t be accessed directly.
Subscribe to the security feed or email list.
Thanks for answering my question and even more!
Setting readonly on both indexes worked. I agree though addon files are a risk.
Core snippets typically rely on external files that do nothing by themselves but are only called from their db stored stub. I used to wonder about this but I’ve come to see the security advantage.
Maybe this is sort of a best practice or a design pattern I am not aware of.