WordPress plugin installation failed – Could not create directory

Home Forums BulletProof Security Pro WordPress plugin installation failed – Could not create directory

Tagged: , ,

Viewing 15 posts - 16 through 30 (of 32 total)
  • Author
    Posts
  • #21592
    AITpro Admin
    Keymaster

    Actually I think that you will need to do these steps below because the UID of all of the BPS folders is 99 and the UID of your other WordPress folders is 570 with the exception of your /uploads folder.

    1.  Uninstall BPS Pro on the WordPress Plugins page.
    2.  Manually delete this BPS folder using FTP:  /wp-content/bps-backup/
    3.  Reinstall BPS Pro using the WordPress Upload zip installer (DO NOT use the wp-config.php FS_METHOD code – keep it commented out).
    4.  Activate BPS Pro and run the Setup Wizard.
    5.  Go to the BPS System Info and check that the UID of the /bps-backup/ folder and all other BPS folders/subfolders have a UID of 570 and not 99.

    #21595
    AITpro Admin
    Keymaster

    Or if the BPS folders are still have 99 UID|Owner after reinstalling BPS Pro then going by what your server is doing for the /uploads folder and the /wp-content folder then you will need to change the BPS /bps-backup/ folder and all subfolders from 755 permissions to 777 folder permissions.

    Or you could use SSH and change the Owner of the BPS folders to UID|Owner 570 and leave the 755 folder permission since this works for the WordPress /wp-content/upgrade folder.

    #21604
    reborn
    Participant

    Thanks for the responses.  I let the autorestore run overnight. Well I looked at the Quarantine tab, and see the files listed.  They repeated themselves 12 times i.e the same file listed 12 times. However, when I looked into the server, the file I uploaded is still in the same place I uploaded it to, and also when I looked in the quarantine folder, it is empty

    Additional Replies have been combined into this Reply

    By the way, I am really impressed by your quick helpful support. I’m glad I chose your plugin over other security plugins.
    ______________________________________
    I went into quarantine section of the plugin, selected the files to be deleted and click submit. Now in quarantine section of the plugin, it does not list the files. However, when I look at the files on the site itself, the uploaded file is still there. So I manually deleted them myself. The files are in the original place I uploaded them, not the quarantine folder.
    ______________________________________

    As for step3 in your instructions, do I keep the following code:

    /** BEGIN BPS Pro ini_set Settings **/
    @error_reporting(E_ALL|E_STRICT);
    @ini_set('log_errors','On');
    @ini_set('error_log','/xxxxx/public_html/wp-content/bps-backup/logs/bps_php_error.log'); // add your actual path here
    @ini_set('log_errors_max_len','1024');
    @ini_set('memory_limit','128M');
    @ini_set('ignore_repeated_errors','On');
    @ini_set('ignore_repeated_source','Off');
    @ini_set('allow_url_include','Off');
    @ini_set('define_syslog_variables','Off');
    @ini_set('display_errors','Off');
    @ini_set('display_startup_errors','Off');
    @ini_set('implicit_flush','Off');
    @ini_set('magic_quotes_runtime','Off');
    @ini_set('max_execution_time','30');
    @ini_set('mysql.connect_timeout','30');
    @ini_set('mysql.trace_mode','Off');
    @ini_set('report_memleaks','On');
    /** END BPS Pro ini_set Settings **/

    ________________________________________

    do i need to add this code to wp-config.php

    define('FS_METHOD', 'ftpext');
    define('FTP_BASE', '/path/to/wordpress/');
    define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
    define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
    //define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');
    //define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');
    define('FTP_USER', 'username');
    define('FTP_PASS', 'password');
    define('FTP_HOST', 'ftp.example.org');
    define('FTP_SSL', false);
    #21614
    AITpro Admin
    Keymaster

    The problem is going to be that the Owner|UID of the WordPress folder where the test files were uploaded for testing ARQ and the Owner|UID of the BPS Backup folders is a different Owner|UID.  If the Owner|UID was the same for the BPS Backup /bps-backup/ folders and all subfolders then ARQ would be able to work correctly.  Or it looks like it may be possible to follow what your host is doing with other folders with different UID’s, but logically the best solution would be that BPS Backup /bps-backup/ folders all have the same UID|Owner as the rest of your WordPress folders.

    This:  http://forum.ait-pro.com/forums/topic/unable-to-install-plugins/page/2/#post-21595 is probably the best and simplest possible solution below.

    Or you could use SSH and change the Owner of the BPS folders to UID|Owner 570 and leave the 755 folder permission since this works for the WordPress /wp-content/upgrade folder.

    The ini_set code in your wp-config.php file should work fine and not have any problems with your server configuration so nothing needs to be done with the ini_set code.

    I do not think what is needed is the WordPress wp-config.php ftpext code.  The problem is that different Owners of folders do not have priviledges to do anything except for Read files.  ie AutoRestore|Quarantine (or anything else) cannot move/copy a file from a folder with a different Owner|UID to another folder with a different Owner|UID.

    #21615
    reborn
    Participant

    I reinstalled BPS PRO as per your instructions.  The UID of the /bps-backup/ folder and all other BPS folders/subfolders have a UID are not all 570 and but some are 99.  Exactly the same UID table as I posted before.

    #21617
    AITpro Admin
    Keymaster

    Ok then you will need to use SSH and change the Owner|UID from 99 to 570.  Personally I do not think it is a good idea to use 777 folder permissions if you can avoid it.

    #21621
    reborn
    Participant

    Script Owner User ID (UID)   or  File Owner User ID to 570 or both to 570??

    so should i keep the following code?

    define('FS_METHOD', 'ftpext');
    define('FTP_BASE', '/path/to/wordpress/');
    define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
    define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
    //define('FTP_PUBKEY', '/home/username/.ssh/id_rsa.pub');
    //define('FTP_PRIKEY', '/home/username/.ssh/id_rsa');
    define('FTP_USER', 'username');
    define('FTP_PASS', 'password');
    define('FTP_HOST', 'ftp.example.org');
    define('FTP_SSL', false);
    #21623
    AITpro Admin
    Keymaster

    You would change the Owner|UID to 570 for both.  When you change the Owner of a folder it should change both of these at the same time.

    Logically I would say no because your host server configuration was working for you before even though you are prompted for authentication whenever you want to install anything on this server.  Typically you add any additional wp-config.php code like that when things are not working.  Normally adding the define('FS_METHOD', 'direct'); code works on every/all servers and fixes any/all issues or problems, but for whatever reason it does not work on your particular host server configuration.  You could check with your host support folks and ask them why the “direct” WordPress Filesystem API Method is not working on your website/server and ask them to change whatever needs to be changed on the server to fix that.  Or simply just change the Owner|UID of the BPS Backup folders to 570.

    #21632
    reborn
    Participant

    hmm, let me ask my host first.  My sites are on a managed dedicated server, and it could save time if they just change the server configurations.

    So I just ask them to

    why the “direct” WordPress Filesystem API Method is not working on my website/server and please to change whatever needs to be changed on the server to fix

    oh i pasted the wrong code, I meant to ask, should I keep the following code in wp-config.php:

    /** BEGIN BPS Pro ini_set Settings **/
    @error_reporting(E_ALL|E_STRICT);
    @ini_set('log_errors','On');
    @ini_set('error_log','/xxxxx/public_html/wp-content/bps-backup/logs/bps_php_error.log'); // add your actual path here
    @ini_set('log_errors_max_len','1024');
    @ini_set('memory_limit','128M');
    @ini_set('ignore_repeated_errors','On');
    @ini_set('ignore_repeated_source','Off');
    @ini_set('allow_url_include','Off');
    @ini_set('define_syslog_variables','Off');
    @ini_set('display_errors','Off');
    @ini_set('display_startup_errors','Off');
    @ini_set('implicit_flush','Off');
    @ini_set('magic_quotes_runtime','Off');
    @ini_set('max_execution_time','30');
    @ini_set('mysql.connect_timeout','30');
    @ini_set('mysql.trace_mode','Off');
    @ini_set('report_memleaks','On');
    /** END BPS Pro ini_set Settings **/
    #21640
    AITpro Admin
    Keymaster

    Yes.  Keep the ini_set code in your wp-config.php file.  It is completely unrelated to any of these issues with Ownership or anything else with this issue.

    I would phrase the question/request to your support folks like this so that you do not get a defensive response/reaction:

    Currently on my WordPress website I am prompted with an authentication popup window since WordPress is using the ftpext Filesystem API Method.  I would like to use this WordPress code:  define('FS_METHOD', 'direct'); which will allow me to install things on my WordPress site and server without being prompted for authentication.  I attempted to use this WordPress code, but when I attempt to install anything (a plugin, etc) the installation fails with this error message:  Could not create directory.  I assume this issue has to do with Ownership of folders/files or some other server configuration (suPHP, suEXEC) that does not allow the WordPress Filesystem API Method:  “direct” to be used on my particular website/server.  Would it be possible to change the server configuration so that I can use the WordPress Filesystem API Method:  “direct” on my server?

    #21641
    reborn
    Participant

    Thanks for advising on the better question to my host.  I don’t know about these API’s and such, so had no idea how I should ask it.  I have now opened a support ticket on my host.  Thanks!

    #21642
    AITpro Admin
    Keymaster

    Yep good old “catch more flies with honey…” is always the best route to take.  😉

    #21644
    reborn
    Participant

    yes indeed 🙂

    #21670
    reborn
    Participant

    I tried to uninstall the BPS pro, so I can start from the beginning. So I uninstalled it, but then when I try to install it again, I get this error: Plugin could not be activated because it triggered a fatal error.

    Warning: require_once(/home/xxxx/public_html/wp-content/plugins/bulletproof-security/includes/class.php) [function.require-once]: failed to open stream: No such file or directory in //xxxx/public_html/wp-content/plugins/bulletproof-security4/bulletproof-security.php on line 78
    Fatal error: require_once() [function.require]: Failed opening required '/home/xxxx/public_html/wp-content/plugins/bulletproof-security/includes/class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /xxx/xxx/public_html/wp-content/plugins/bulletproof-security4/bulletproof-security.php on line 78
    #21671
    reborn
    Participant

    Ah ok, some how it got installed as bulletproof-security4.  I just changed directory to bulletproof-security and its installed ok

Viewing 15 posts - 16 through 30 (of 32 total)
  • You must be logged in to reply to this topic.