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

[Super Cache] wp-config permissions changed on activation / deactivation #27324

Closed
thingalon opened this issue Nov 9, 2022 · 0 comments · Fixed by #28164
Closed

[Super Cache] wp-config permissions changed on activation / deactivation #27324

thingalon opened this issue Nov 9, 2022 · 0 comments · Fixed by #28164
Assignees
Labels
[Plugin] Super Cache A fast caching plugin for WordPress. [Pri] Normal [Type] Bug When a feature is broken and / or not performing as intended

Comments

@thingalon
Copy link
Member

Relevant link: https://wordpress.org/support/topic/wp-config-php-permissions-set-to-600/

A user has observed that their wp-config.php file had its permissions changed from 644 to 600 during installation and uninstallation of Super Cache.

Super Cache updates wp-config.php to add the WP_CACHE and WPCACHEHOME constants to facilitate managing the cache before WordPress (and the connection to its database) has finished loading. To do so safely, Super Cache copies wp-config.php to a new file with the relevant edits - then renames the new file in place of the old one. Along the way, it doesn't copy the file permissions from the original wp-config.php to the new one.

We should add a chmod to the process to ensure the updated wp-config.php file has the same permissions as the original.

@thingalon thingalon added Needs triage Ticket needs to be triaged [Plugin] Super Cache A fast caching plugin for WordPress. labels Nov 9, 2022
@brbrr brbrr added [Type] Bug When a feature is broken and / or not performing as intended [Pri] Normal and removed Needs triage Ticket needs to be triaged labels Jan 3, 2023
@dilirity dilirity self-assigned this Jan 4, 2023
dilirity added a commit that referenced this issue Jan 9, 2023
#28164)

* Preserve file permissions after making changes to it (#27324)

* Update changelog
n3f pushed a commit that referenced this issue Jan 11, 2023
…fter updating it (#28164)

* Preserve file permissions after making changes to it (#27324)

* Update changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Super Cache A fast caching plugin for WordPress. [Pri] Normal [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
4 participants