file_put_contents failed to open stream: Permission denied in functions.php on line 501

Home Forums BulletProof Security Free file_put_contents failed to open stream: Permission denied in functions.php on line 501

This topic contains 4 replies, has 2 voices, and was last updated by  Chazz 3 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #21233

    Chazz
    Participant

    after the latest update i started receiving the following errors on top of my control panel:
    any clue what i have to do to resolve this?
    thanx!

    Warning: file_put_contents(/home/xxxxx/domains/cbtisrael.co.il/public_html/.htaccess) [function.file-put-contents]: failed to open stream: Permission denied in /home/xxxxx/domains/cbtisrael.co.il/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 501
    Warning: file_put_contents(/home/xxxxx/domains/cbtisrael.co.il/public_html/wp-admin/.htaccess) [function.file-put-contents]: failed to open stream: Permission denied in /home/xxxxx/domains/cbtisrael.co.il/public_html/wp-content/plugins/bulletproof-security/includes/functions.php on line 629
    #21235

    AITpro Admin
    Keymaster

    The first error means that BPS is being blocked/prevented by something either installed on your website or your server (open_basedir, file or folder permissions or Ownership) that is not allowing the root .htaccess file to be automatically updated using the PHP file_put_contents() function.  The second error means that BPS is being blocked/prevented by something either installed on your website or your server (open_basedir, file or folder permissions or Ownership) that is not allowing the wp-admin .htaccess file to be automatically updated using the PHP file_put_contents() function.  Contact your website host support and send them a link to this forum topic.

    #21236

    Chazz
    Participant

    could it just be CHMOD access since i always need to manually change permissions each time i make changes to htaccess?

    #21237

    AITpro Admin
    Keymaster

    Yes.  Then that would probably mean that the Owner of your htaccess files is not the same Owner of your other WordPress folders and files.  You can check that on the BPS System Info page under Folder|File|UID Permissions and Ownership.  If you prefer to do things manually that is fine and would just mean that you would temporarily change Ownership or Permissions to allow BPS to complete the automatic update and then change things back the way they were before.

    http://php.net/manual/en/function.chmod.php

    #21240

    Chazz
    Participant

    Yup, that resolved it. thanx!

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.