Join the community today
Become a Member

Domain folders recovered after deleting

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by AHTOLLlKA, Oct 26, 2022.

  1. AHTOLLlKA

    AHTOLLlKA Member

    32
    4
    8
    Dec 1, 2017
    Ratings:
    +9
    Local Time:
    4:47 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    • Nginx Version Installed: 1.21.6
    • PHP Version Installed: 7.4.28
    • MariaDB MySQL Version Installed: 10.3.34
    • When was last time updated Centmin Mod code base ? : every day
    • Persistent Config: Do you have any persistent config file options set in /etc/centminmod/custom_config.inc ? You can check via this command:
      Code (Text):
      NGINX_SSLCACHE_ALLOWOVERRIDE='y'
      NGINX_STAPLE_CACHE_OVERRIDE='y'
      NGINX_STAPLE_CACHE_TTL='86400'
      SET_DEFAULT_MYSQLCHARSET='utf8mb4'
      AUTOHARDTUNE_NGINXBACKLOG='y'
      ZSTD_LOGROTATE_NGINX='y'
      ZSTD_LOGROTATE_PHPFPM='y'
      LETSENCRYPT_DETECT='y'
      DUALCERTS='y'
      SELFSIGNEDSSL_ECDSA='y'
      NGINX_LIBBROTLI='y'
      NGXDYNAMIC_BROTLI='y'
      PHP_PGO_ALWAYS='y'
      PHP_PGO='y'
      PHP_BROTLI='y'
      PHP_LZFOUR='y'
      PHP_LZF='y'
      PHP_ZSTD='y'
      PHPFINFO='y'
      WPCLI_CE_QUERYSTRING_INCLUDED='y'
      MARCH_TARGETNATIVE='n'
      
      

      Post output in CODE tags.

      i have install many wordpress domains via menu 22

      after some months i delet this domains via
      /root/tools/wp_uninstall_domain.sh

      all deleted without errors
      and domain folder in /home/nginx/domains/
      was also deleted

      but after some days this domain folder auto recreated
      with empty subfolder "public"

      if i delete this folder manually via rm -rf domain_folder
      this folder recreated again....
      how fix this ??


     
  2. eva2000

    eva2000 Administrator Staff Member

    49,766
    11,447
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,789
    Local Time:
    11:47 AM
    Nginx 1.21.x
    MariaDB 10.x
    You mean you manually deleted directory at /home/nginx/domains/? Why do you want to do that? Centmin Mod Nginx host site's data and files go into sub directories there's that parent directory will be created when needed i.e /home/nginx/domains/yourdomain.com
     
  3. AHTOLLlKA

    AHTOLLlKA Member

    32
    4
    8
    Dec 1, 2017
    Ratings:
    +9
    Local Time:
    4:47 AM
    No, I delete through the script /root/tools/wp_uninstall_domain.sh.
    I check that the site directory is deleted.
    but after a few days this directory is restored automatically, although the site is deleted.
    I need to understand why this is happening and fix it.
    no other scripts installed on the server
     
  4. eva2000

    eva2000 Administrator Staff Member

    49,766
    11,447
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,789
    Local Time:
    11:47 AM
    Nginx 1.21.x
    MariaDB 10.x
    /root/tools/wp_uninstall_domain.sh should only delete stuff in /home/nginx/domains/domain.com and subdirectories it should not delete /home/nginx/domains parent directory. If that is what happened can you private message me to share the contents of your /root/tools/wp_uninstall_domain.sh script.

    The /home/nginx/domains parent directory is required so will be created if missing as that is expected. But are you saying /home/nginx/domains/domain.com/public and other subdirectories are being recreated?

    when you list cronjobs via command
    Code (Text):
    crontab -l

    is there any specific cronjobs for that domain name listed?
     
  5. AHTOLLlKA

    AHTOLLlKA Member

    32
    4
    8
    Dec 1, 2017
    Ratings:
    +9
    Local Time:
    4:47 AM
    Code:
    
    /usr/local/nginx/conf/wpincludes/domain_name.com/wpinfo.sh
    /root/.acme.sh/domain_name.com_ecc/
    /root/tools/wp_uninstall_domain_name.com.sh
    /usr/local/nginx/conf/acmevhostbackup/domain_name.com.ssl.conf-acmebackup-270422-152046
    /usr/local/nginx/conf/acmevhostbackup/domain_name.com.conf-backup-removal-https-default-270422-152046
    
    I found these files a few days after deleting the site through script /root/tools/wp_uninstall_domain.sh

    no domain in crontab -l

    nope, just /home/nginx/domains/domain.com/public
    without any files
    directories "domain_name" and "public" have root:nginx rights
    but other not deleted domain folders have nginx:nginx
     
  6. eva2000

    eva2000 Administrator Staff Member

    49,766
    11,447
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,789
    Local Time:
    11:47 AM
    Nginx 1.21.x
    MariaDB 10.x
    yes uninstall script missed the that file it seems - will need to update uninstall script for this
    This is from acme.sh client that addons/acmetool.sh uses for letsencrypt SSL certificates and seem to missed the _ecc version from dual SSL cert setups - will need to update uninstall script for this
    yeah uninstall script won't delete itself as intended. For this very reason troubleshooting would help having access to that script. You can delete it yourself.
    addons/acmetool.sh created backups for the non-HTTPS and HTTPS nginx vhost config files when you select HTTPS default Letsencrypt SSL as the routine modifies those vhost config files for HTTPS default, so you have a record of before and after changes. Will need to update uninstall script for this
     
  7. AHTOLLlKA

    AHTOLLlKA Member

    32
    4
    8
    Dec 1, 2017
    Ratings:
    +9
    Local Time:
    4:47 AM
    how can i fix this for future domains?
    because I'm reinstalling the server, I screwed up somewhere
     
  8. eva2000

    eva2000 Administrator Staff Member

    49,766
    11,447
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,789
    Local Time:
    11:47 AM
    Nginx 1.21.x
    MariaDB 10.x
    For the mentioned updates I will do in above reply, I already updated Centmin Mod 130.00beta01 version with such fixes so future centmin.sh menu option 22 generated Wordpress unsinatller's should handle the overlooked files on uninstall too. So on 130.00beta01 just run command cmupdate to ensure you have latest code before running centmin.sh menu option 22 for future created Wordpress sites.
     
  9. AHTOLLlKA

    AHTOLLlKA Member

    32
    4
    8
    Dec 1, 2017
    Ratings:
    +9
    Local Time:
    4:47 AM
    seems to need to update to 130.00beta01
     
  10. eva2000

    eva2000 Administrator Staff Member

    49,766
    11,447
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +17,789
    Local Time:
    11:47 AM
    Nginx 1.21.x
    MariaDB 10.x
    Yeah 130.00beta01 will always get the latest and quickest fixes before 124.00stable :)
     
  11. AHTOLLlKA

    AHTOLLlKA Member

    32
    4
    8
    Dec 1, 2017
    Ratings:
    +9
    Local Time:
    4:47 AM
    Code:
    cmupdate
    cmupdate update-beta
    cmdir
    centmin
    updated, now i need more tests
    restoring 93 domains is so tiring))