Join the community today
Become a Member

Beta Branch update inc/wpsetup.inc sucuri-scanner data storage path in 123.09beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Sep 24, 2016.

  1. eva2000

    eva2000 Administrator Staff Member

    30,131
    6,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,128
    Local Time:
    10:28 AM
    Nginx 1.13.x
    MariaDB 5.5
    update inc/wpsetup.inc sucuri-scanner data storage path in 123.09beta01

    update sucuri-scanner wordpress plugins default data storage path and move it one level above web root so it changes from /home/nginx/domains/${vhostname}/public/wp-content/uploads/sucuri/ to /home/nginx/domains/${vhostname}/sucuri_data_storage

    Continue reading...

    123.09beta01 branch
     
  2. John

    John New Member

    5
    1
    3
    Nov 17, 2016
    Ratings:
    +1
    Local Time:
    8:28 AM
    1.10.2
    MariaDB 10.0.28
    boss how to setup this manually using ssh?
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,131
    6,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,128
    Local Time:
    10:28 AM
    Nginx 1.13.x
    MariaDB 5.5
    The automated sets are outlined in above link to update inc/wpsetup.inc sucuri-scanner data storage path in 123.09beta01 · centminmod/centminmod@834c244 · GitHub but it only works on fresh sucuri wp plugin installs which have yet to have any settings changed or the wp-admin sucuri options section hasn't been visited yet. Otherwise, those steps will wipe the existing settings for sucuri wp plugin.

    If you ran centmin.sh menu option 22 to auto install wordpress on 123.09beta01 branch, then it would of been auto setup for you.

    so manually would need to change first vhostname variable to yourdomain.com
    Code (Text):
    vhostname='yourdomain.com'
    sucuri_datapath=$(echo "/home/nginx/domains/${vhostname}/sucuri_data_storage" | sed -e 's|/|\\\/|g')
    rm -rf "/home/nginx/domains/${vhostname}/sucuri_data_storage"
    mkdir -p "/home/nginx/domains/${vhostname}/sucuri_data_storage"
    chown nginx:nginx "/home/nginx/domains/${vhostname}/sucuri_data_storage"
    sed -i "s|\"}|\",\"sucuriscan_datastore_path\":\"$sucuri_datapath\"}|" "/home/nginx/domains/${vhostname}/public/wp-content/uploads/sucuri/sucuri-settings.php"
    sed -i 's|/|\\/|g' "/home/nginx/domains/${vhostname}/public/wp-content/uploads/sucuri/sucuri-settings.php"
    ls -lah "/home/nginx/domains/${vhostname}/sucuri_data_storage"
    \cp -Rpf /home/nginx/domains/${vhostname}/public/wp-content/uploads/sucuri/* "/home/nginx/domains/${vhostname}/sucuri_data_storage"
    cat "/home/nginx/domains/${vhostname}/sucuri_data_storage/sucuri-settings.php"
    

    You can't totally remove the default /home/nginx/domains/${vhostname}/public/wp-content/uploads/sucuri/ directory as it will come back. So above steps and automated ones, will leave a copy of /home/nginx/domains/${vhostname}/public/wp-content/uploads/sucuri/ directory but all the settings file content will do is point to updated settings location at /home/nginx/domains/${vhostname}/sucuri_data_storage/sucuri-settings.php

    Again on existing sucuri wp plugin installs, such steps will probably wipe existing sucuri settings so will need redoing the settings.
     
    • Agree Agree x 1
  4. John

    John New Member

    5
    1
    3
    Nov 17, 2016
    Ratings:
    +1
    Local Time:
    8:28 AM
    1.10.2
    MariaDB 10.0.28
    thank you boss for your reply is this script can i run in .sh format? i'm just newbie here hehe
    i just try the beta but have bugs so i go back to 123.08stable
     
    Last edited: Nov 17, 2016
  5. eva2000

    eva2000 Administrator Staff Member

    30,131
    6,778
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,128
    Local Time:
    10:28 AM
    Nginx 1.13.x
    MariaDB 5.5
    best to report those bugs at Bug Reports | Centmin Mod Community

    they're just commands you can copy and paste
     
    • Like Like x 1
  6. John

    John New Member

    5
    1
    3
    Nov 17, 2016
    Ratings:
    +1
    Local Time:
    8:28 AM
    1.10.2
    MariaDB 10.0.28
    thank you again boss :D