Ticket #1934 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 2 years ago

wp-db-backup patch

Reported by: skippy Assigned to: anonymous
Priority: normal Milestone:
Component: Administration Version: 1.6
Severity: normal Keywords: bg|has-patch wp-db-backup
Cc:

Description

  • wp-db-backup requires that /wp-content/ be writable, in order to create a backup destination directory that is not easily guessed. I strongly discourage /wp-content/ from being writable. Specific directories underneath can (and should) be writable.
  • the error message supplied when /wp-content/ is not writable is not helpful:
    WARNING: Your wp-content directory is NOT writable! We can not create the backup directory.
    /home/skippy/public_html/wp
    

The display of ABSPATH is actively misleading. This is a more helpful message:

WARNING: Your /wp-content/backup/ directory is NOT writable! We cannot create the backup directory:
/home/skippy/public_html/wp/wp-content/backup/FOO
  • The error message is repeated, which is less than useful.

The attached patch:

  • revised WP_BACKUP_DIR to use /wp-content/backup/XXX
  • displays the whole path in the error message
  • and dies outright if the backup directory cannot be created so as to suppress multiple error messages.

Attachments

wp-db-backup.diff (1.7 kB) - added by skippy on 11/21/05 21:16:09.

Change History

11/21/05 21:16:09 changed by skippy

  • attachment wp-db-backup.diff added.

11/21/05 21:16:30 changed by skippy

  • keywords set to bg|has-patch wp-db-backup.

11/25/05 05:20:33 changed by matt

We have always encouraged wp-content to be writable, unless you can give a compelling argument otherwise I don't see any reason to include the directory part of this patch.

The wiki page you refer to in your weblog post is misleading and should probably be updated.

http://codex.wordpress.org/Hardening_WordPress#File_permissions

The error messages could still bear being more helpful, I'll see if I can roll in that part.

11/25/05 09:12:24 changed by matt

  • status changed from new to closed.
  • resolution set to fixed.

(In [3212]) Better error, fixes #1934

11/30/06 19:41:47 changed by

  • milestone deleted.

Milestone 2.0 deleted