ini_set Options DSO – chmod operation not permitted, file_put_contents permission denied

Home Forums BulletProof Security Pro ini_set Options DSO – chmod operation not permitted, file_put_contents permission denied

This topic contains 21 replies, has 3 voices, and was last updated by  amanda 1 year ago.

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #2774

    AITpro Admin
    Keymaster

    Email Question:

    Am going through the installation process and have run into an error.
    I’ve attached a link to a screen print here: [screenshot image added/uploaded to Topic]
    I can’t move forward to the next step without resolving this, as the error log path, for the PHP error log location, is blank.
    I had a problem prior to this warning with locating my wp-config file, as I had put it in the parent directory.
    I’ve since moved it back to it’s normal place but can’t move forward.
    Any idea how I can fix this?

    ini_set options chmod and file_put_contents errors

    #2778

    AITpro Admin
    Keymaster

    What file permissions does your wp-config.php file have?  If the wp-config.php file permission is not 644 then change it to 644 file permissions.  Are the CHMOD and file_put_contents functions disabled in your php.ini file?  You can check this by clicking on the PHP Info Viewer Tab page and click the View PHPINFO button to view your Server’s PHP Configuration settings.  Look for this PHP directive:  disable_functions and check to see if CHMOD and file_put_contents are disabled.  If you see them listed in this directive then they are disabled on your Server.  Let me know if they are disabled on your Server.

    #2780

    Jon
    Member

    Clicking on the View PHPINFO button brings up this:
    Forbidden
    You don’t have permission to access /wp-content/plugins/bulletproof-security/admin/php/bps-phpinfo.php on this server.

     

    Apache Server at lazulicreations.com Port 80

    #2781

    Jon
    Member

    Sorry, just to clarify, I tried that after checking the wp-config.php file permissions, which were 644. I reapplied them and tried again anyway without success.

    Permissions on bps-phpinfo.php are at 777.

    #2785

    AITpro Admin
    Keymaster

    I checked your website and your Server is an Nginx Server.  BPS Pro will work on an Nginx Server if Nginix is the frontend Server and Apache is the backend Server handling PHP processing.  Did you previously have BPS Free installed?

    Go to the BPS Pro B-Core System Info page and post this information about your website.

    Server Type: 
    Operating System: 
    Server API: 

    #2789

    Jon
    Member

    Aaah, I see. They say they run an Apache server…

    I didn’t have free installed, no. I had it on another installation but not on this one, which was a fresh install.

    Server Type: Apache
    Operating System: Linux
    Server API: apache – Your Host Server is using DSO or another SAPI type.

    #2790

    AITpro Admin
    Keymaster

    Ok good you have an Apache Server processing PHP code and an Nginx frontend Server.  This is a compatible Server configuration for BPS and BPS Pro.  Since you have a DSO configured Server you will need to do additional setup steps.  This Forum Topic link below contains DSO setup steps, but needs to be updated to include the additional DSO setup steps for the ini_set Options setup.

    http://forum.ait-pro.com/forums/topic/bulletproof-security-pro-compatibility-check-upgrading-from-bps-free-to-bps-pro/

    You will either need to temporarily change the file permissions on your wp-config.php file to 777 so that BPS Pro can write to the wp-config.php file or you will need to manually add the ini_set Options code to your wp-config.php file.  You will find the ini_set Options code in this file:  /wp-content/plugins/bulletproof-security/admin/php/php-directives-code-for-wp-config.txt.

    Or instead of using the ini_set Option you can instead create a custom php.ini file for your website.  If your PHP Server version is 5.3.x or above then this will require some manual configuration of your custom php.ini file.  See the Forum Topic link below.

    http://forum.ait-pro.com/forums/topic/custom-php-ini-file-setup-php5-3-x/

    #2796

    Jon
    Member

    I had manually added the code previously, but set my wp-config.php to 777 anyway, along with the rest in the linked forum post.

    One of the errors has now disappeared, but I’m still getting the first –

    Warning: chmod() [function.chmod]: Operation not permitted in /home/.../htdocs/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1149

    Have I missed something?

    #2798

    Jon
    Member

    Just checked the permissions again and realised it wasn’t letting me change some:

    Activate Deny All htaccess Folder Protection For The BPS Backup Folder
    – Change permissions of the /wp-content/bps-backup/htaccess file to 777.
    Backup Your Currently Active .htaccess Files
    – Change /bps-backup folder permissions to 777 – /wp-content/bps-backup.
    Backup Your BPS Master .htaccess Files
    – Change /master-backups folder permissions to 777 – /wp-content/bps-backup/master-backups.

    For all of these three I’m getting: 550 CHMOD 777 *file/folder name*: Operation not permitted

    #2800

    Jon
    Member

    Scratch that. I’ve reset the folder owner again and can now change those three as well.

    Now getting:

    Warning: chmod() [function.chmod]: Operation not permitted in /home/.../htdocs/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1149
    
    Warning: copy(/home/xxxxx/htdocs/wp-content/bps-backup/autorestore/root-files/wp-config.php) [function.copy]: failed to open stream: Permission denied in /home/.../htdocs/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1153
    
    Warning: copy(/home/xxxxx/htdocs/wp-content/bps-backup/logs/bps_php_error.log) [function.copy]: failed to open stream: Permission denied in /home/.../htdocs/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1154

    I’m unsure of how to switch my Server Configuration from DSO to suPHP – I don’t seem to have that option anywhere in my control panel…

    Is that what these errors are related to?

    #2803

    AITpro Admin
    Keymaster

    You do not necessarily need to change to suPHP from DSO.  Typically the problem that occurs is an ownership problem when you see these types of permission denied errors.  The Owner is nobody:nobody for example and you would want to change this to your user name.  Example user name is my-example-username.  So you would change the Owner to my-example-username:my-example-username.

    Reference Links:

    http://httpd.apache.org/docs/current/dso.html

    http://boomshadow.net/tech/php-handlers/

    #2827

    Jon
    Member

    I can’t find any way in my control panel to manually define the username. I can reassign ownership of the file and have done for the entire directory. Have also set the entire directory to 777 (not advisable, I know!).

    The only error I’m still getting is the first one:

    Warning: chmod() [function.chmod]: Operation not permitted in /home/…/htdocs/wp-content/plugins/bulletproof-security/admin/php/php-options.php on line 1149

    I’m at a loss of how to proceed. I can put in a query with my server about changing from DSO to suPHP, but other than that I’m not sure what else I can do…

    #2836

    AITpro Admin
    Keymaster

    Ownership would be changed at the file access level (example:  FTP level).  I recommend this free software:  WinSCP

    NOTE: WinSCP is a really nice and easy application for SSH file uploading or for changing Ownership.

    You can download WinSCP here: http://winscp.net/eng/download.php#download2 – click on either the Portable executables link or the Installation package link to install WinSCP.

     

    #2837

    Jon
    Member

    Thanks for the suggestion! I had been using FileZilla, which doesn’t seem to display user info.

    Unfortunately, my group and owner dropdowns are greyed out in the WinSCP properties menu… :S

    If I were to email you my FTP information could you possibly take a quick look? I’m totally out of my depth here. Simple CSS changes and the occasional code snippets are about all I usually manage!

    #2838

    AITpro Admin
    Keymaster

    You would need to log in with SFTP or SCP (SSH must be enabled on your Server) and not plain old FTP in order to change Ownership.

    Instead of changing folder permissions to 777 try just changing the wp-config.php file permissions to 777 temporarily so that you can complete the ini_set options setup and then change it back to 644 permissions.

Viewing 15 posts - 1 through 15 (of 22 total)

You must be logged in to reply to this topic.