Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check default file permissions #173

Closed
azett opened this issue Dec 17, 2022 · 3 comments
Closed

Check default file permissions #173

azett opened this issue Dec 17, 2022 · 3 comments
Labels

Comments

@azett
Copy link
Member

azett commented Dec 17, 2022

Question by Rudra on Twitter:

Why does setup.php change the permission to 777 globally in the flatpress webroot? Isn't 640 better?

Legit question - needs to be inspected.

@azett azett added the security label Dec 17, 2022
@Fraenkiman
Copy link
Collaborator

Fraenkiman commented Jan 24, 2023

Hello all,

In fact, some files and directories require full access, both for users and groups. Historically, until June 2011, rights management was handled by core.filesystem.php and plugin.thumb.php. For simplification, which is a good thing, the rights management then moved to the default.php file.
However, until Octoper 2023 not the FlatPress setup changes the permission. The default values of the permission 0777 are only read via the defaults.php - not executed. To do this, you must actively "reset the permission" in the administration area in the Maintenance panel.

Unfortunately, not all web servers are set up optimally, and the Flatpress admin does not have access to the server's permissions; possibly also not enough knowledge to secure the web server. Therefore the solution "Everyone is allowed to do everything (777)" is the easiest - and guarantees that FlatPress will run.

There are two possible solutions:

  1. In the administration area, a maintenance mode with the permissions 0775 is provided in the Maintenance panel.
    In online mode, the permission is lowered to a smaller level.

or

2. the PrettyURLs plugin already offer the possibility to install a predefined .htaccess file. It may be possible to bag a little more security over this. But again, the webserver must support .htaccess.

@azett , what do you think about this?

With best regards
Frank

@Fraenkiman
Copy link
Collaborator

Fraenkiman commented Oct 6, 2023

@Fraenkiman
Copy link
Collaborator

I am closing this issue because we have found a good middle ground. It can be reopened if required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants