Skip to content

Cannot create the secure folder

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...

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/

Manually create the required directories with the correct permissions.

  1. Open your hosting file manager.
  2. Navigate to your WordPress installation.
  3. Open wp-content/.
  4. Create the folder: vulnity-data.
  5. Inside vulnity-data, create: firewall and logs.
  6. Set permissions to 755 for all three folders.
  7. If that does not work, try 775.
  8. Reload the WordPress panel.

There may be ownership conflicts. Example:

  • wp-content/ belongs to user:user
  • vulnity-data/ belongs to root:root

This mismatch prevents Vulnity from accessing the files.

From the WordPress root:

Terminal window
mkdir -p wp-content/vulnity-data/firewall
mkdir -p wp-content/vulnity-data/logs
chmod 755 wp-content/vulnity-data
chmod 755 wp-content/vulnity-data/firewall
chmod 755 wp-content/vulnity-data/logs

If it still fails:

Terminal window
chmod 775 wp-content/vulnity-data
chmod 775 wp-content/vulnity-data/firewall
chmod 775 wp-content/vulnity-data/logs

The owner must match wp-content/; it should not be root.

Terminal window
stat -c '%U %G %n' wp-content wp-content/vulnity-data wp-content/vulnity-data/firewall wp-content/vulnity-data/logs
Terminal window
chown -R <user>:<group> wp-content/vulnity-data

Example:

Terminal window
chown -R user:user wp-content/vulnity-data

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/.

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.php
    • wp-content/vulnity-data/logs/vulnity-log.php
  • Apache configuration.
  • Nginx configuration.
  • The uploads folder.
  • The plugins directory.