All In One WP Security & Firewall
[resolved] Unable to backup .htaccess, config.php files change db prefix, permissions (6 posts)

  1. cbh
    Posted 3 years ago #

    When I attempt to do any of the backups to .htaccess, or wp-config, I get the following message (I changed my domain name/path to "xxmywebinfoxx" :

    "Warning: copy(/xxmywebinfoxx/wp-config.php.backup): failed to open stream: Permission denied in /xxmywebinfoxx/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-utility-file.php on line 49 Warning: fopen(/xxmywebinfoxx/wp-content/plugins/all-in-one-wp-security-and-firewall/logs/wp-security-log.txt): failed to open stream: Permission denied in /xxmywebinfoxx/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php on line 52 Warning: fwrite(): supplied argument is not a valid stream resource in /xxmywebinfoxx/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php on line 53 Warning: fclose(): supplied argument is not a valid stream resource in /xxmywebinfoxx/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php on line 54"

    This is happening on a couple of wordpress installations, but not on the one I had the password protected problem with in my previous message (on password protected pages) I am a reseller, and the problem wordpress sites are all under one reseller account, while the one NOT having the problem is elsewhere. Is this something to do with file permissions, or perhaps something I need to discuss with my ISP?



  2. mra13
    Plugin Author

    Posted 3 years ago #

    That looks like a file permission issue to me. Depending on what PHP Handler is being used on your server, WordPress may not be running as root. Which means the plugin won't be able to do some file operations unless the permissions on the file/folder is fixed.

    I would also recommend you to make sure the path is correct. If you have done some path modification then the plugin may not be able to retrieve the path correctly. Does the following path look correct for that file? Is there where your config file is on the server?


  3. cbh
    Posted 3 years ago #

    Thanks - no path modifications have been made here - my support person raised this question - 'Do you know if this plugin requires wordpress to run as root? On the Shared Cluster, files are owned and run by the user itself (never root). '

    Is there any fix for this at your end or would this be something my ISP would need to do. It seems odd that in one account I have with them there's no problem, but in the other there is.


  4. cbh
    Posted 3 years ago #

    BTW, I also tried turning off all other plugins - no luck with that.

  5. rexgoode
    Posted 3 years ago #

    I solved it by doing this (Linux) on the document root directory for my website:

    touch wp-config.php.backup
    chmod 666 wp-config.*

    Then, after the operation worked, I did:

    chmod 644 wp-config.*

  6. rexgoode
    Posted 3 years ago #

    Oh, and after the 'touch' and before the 'chmod':

    chown owner:group wp-config.php.backup

    Don't do this command literally. You have to know the right names for "owner" and "group".

    If you aren't sure, do an "ls -l" command and see what the others are. It's possible you won't have permission to run "chown". See your hosting provider about changing it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic