Cannot create the secure folder
When to use this guide
Section titled “When to use this guide”Use this guide if WordPress shows messages such as:
Vulnity could not create the secure firewall storage directory...Vulnity could not create its secure log storage directory...
What it means
Section titled “What it means”PHP does not have permission to create directories inside wp-content/. Vulnity needs:
wp-content/vulnity-data/With these subfolders:
wp-content/vulnity-data/firewall/wp-content/vulnity-data/logs/Fastest solution
Section titled “Fastest solution”Manually create the required directories with the correct permissions.
Hosting-panel solution
Section titled “Hosting-panel solution”- Open your hosting file manager.
- Navigate to your WordPress installation.
- Open
wp-content/. - Create the folder:
vulnity-data. - Inside
vulnity-data, create:firewallandlogs. - Set permissions to
755for all three folders. - If that does not work, try
775. - Reload the WordPress panel.
If 775 still fails
Section titled “If 775 still fails”There may be ownership conflicts. Example:
wp-content/belongs touser:uservulnity-data/belongs toroot:root
This mismatch prevents Vulnity from accessing the files.
SSH solution
Section titled “SSH solution”From the WordPress root:
mkdir -p wp-content/vulnity-data/firewallmkdir -p wp-content/vulnity-data/logschmod 755 wp-content/vulnity-datachmod 755 wp-content/vulnity-data/firewallchmod 755 wp-content/vulnity-data/logsIf it still fails:
chmod 775 wp-content/vulnity-datachmod 775 wp-content/vulnity-data/firewallchmod 775 wp-content/vulnity-data/logsThe owner must match wp-content/; it should not be root.
Check owner
Section titled “Check owner”stat -c '%U %G %n' wp-content wp-content/vulnity-data wp-content/vulnity-data/firewall wp-content/vulnity-data/logsFix owner
Section titled “Fix owner”chown -R <user>:<group> wp-content/vulnity-dataExample:
chown -R user:user wp-content/vulnity-dataIf the problem persists
Section titled “If the problem persists”The issue is probably in wp-content/ itself, not in vulnity-data. Contact your hosting provider with this message:
!!! info “Message for support”
PHP cannot create wp-content/vulnity-data/. I need permissions that allow PHP to create directories and write files inside wp-content/.
Verification
Section titled “Verification”Signs of success:
- The warning disappears.
- These directories exist:
wp-content/vulnity-data/wp-content/vulnity-data/firewall/wp-content/vulnity-data/logs/
- Vulnity creates:
wp-content/vulnity-data/firewall/blocks.phpwp-content/vulnity-data/logs/vulnity-log.php
No need to modify
Section titled “No need to modify”- Apache configuration.
- Nginx configuration.
- The
uploadsfolder. - The plugins directory.