Join the community today
Register Now

Site crashes while ftping?

Discussion in 'Install & Upgrades or Pre-Install Questions' started by RivaCom, Sep 15, 2016.

  1. RivaCom

    RivaCom New Member

    3
    1
    3
    Sep 15, 2016
    Ratings:
    +1
    Local Time:
    8:13 AM
    So i've tried twice now to install centminmod, both times work fine up until the point where I start to upload files to it. I have a lot of files to upload and probably 5-10 minutes in, the ftp connection disconnects and the website stops working. Any ideas?

     
  2. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    10:13 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Are you uploading via the pure-ftpd virtual ftp user created with your nginx vhost ? It could be due to the way your ftp client connects and transmits as CSF Firewall may see it as an connect of some kind or Pure-FTPD config is limited your connections per IP address (see FAQ item 40).

    What ftp client app you using ? Filezilla ? WinSCP ? Are you uploading the the same location/pc ISP ip address as the one used to initially install Centmin Mod ? If you are, CSF Firewall routine that Centmin Mod runs will also add your pc/ISP ip to exclusion list at /etc/csf/csf.ignore and white lits that ISP ip address in CSF Firewall, preventing you from being blocked or caught in any CS Firewall security measures. So usually, most folks don't run into this problem unless their ISP ip differs from the one they initially installed Centmin Mod from and/or their FTP client's method of connecting and transmitting triggers CSF Firewall.

    So to whitelist your ISP ip as per official CSF Firewall page, you can just add ISP ip to /etc/csf/csf.ignore and then do
    Code (Text):
    csf -a ISPIPADDRESS myispip

    editing /etc/csf/csf.ignore requires CSF Firewall restart so
    Code (Text):
    csf -r


    Or you can just upload using sftp and root user as outlined in Getting Started Guide step 2 and then chown the files and directories to nginx user/group after.

    Or you can just upload a zip file to new directory created in pure-ftpd virtual FTP user i.e. at /home/nginx/domains/yourdomain.com/upload_zips and upload zipped up copy of your files to that directory i.e. public.zip which contains all your public web root files from backup of your site. Then SSH in as root user via SSH client and type the following to cd - change directory and unzip the public.zip file.
    Code (Text):
    cd /home/nginx/domains/yourdomain.com/upload_zips
    unzip public.zip
    

    Then just start moving files to /home/nginx/domains/yourdomain.com/public web root via copy command 'cp'. For example if public.zip contained a previous copy of a cpanel public_html web root of site files, unzipped contents might have /home/nginx/domains/yourdomain.com/upload_zips/public_html extracted so just copy it's contents to /home/nginx/domains/yourdomain.com/public web root
    Code (Text):
    cd /home/nginx/domains/yourdomain.com/upload_zips/public_html
    chown -R nginx:nginx /home/nginx/domains/yourdomain.com/upload_zips/public_html
    \cp -Rpf * /home/nginx/domains/yourdomain.com/public
    

    • 1st command changes into extracted public.zip's /home/nginx/domains/yourdomain.com/upload_zips/public_html directory
    • 2nd command chown's the file and directory permissions to nginx user/group
    • 3rd command copies all files and directories in cd'd directory
      /home/nginx/domains/yourdomain.com/upload_zips/public_html
      recursively, disabling cp alias via backslash and preserves the user/group permissions on all files and directories and force overwrites any existing files found in /home/nginx/domains/yourdomain.com/public
    The last method is usually how i upload files and even do Xenforo forum upgrades/addon upgrades :)
     
    Last edited: Sep 15, 2016
  3. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    10:13 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. RivaCom

    RivaCom New Member

    3
    1
    3
    Sep 15, 2016
    Ratings:
    +1
    Local Time:
    8:13 AM
    Thanks, I will give those methods a shot and let you know. I am using the vhost username/pass i create to upload.

    Also, i can't seem to get the site back online after it crashes. Even a reboot doesn't seem to refresh the services, any ideas?
     
  5. eva2000

    eva2000 Administrator Staff Member

    55,182
    12,251
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,829
    Local Time:
    10:13 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Which web host ? probably isn't crashed just your ISP ip is blocked in CSF Firewall. Do you have a VPN connection you can use ? Try using that to SSH into your server. If you have VPN like private one with dedicated IP, you can also whitelist that VPN IP in CSF Firewall. That's what i usually do so have multiple avenues to connect to server via SSH.

    If you use DigitalOcean or solusVM based web host VPS they have consoles you can use to connect to your server out of band so you can access your server SSH and unblock yourself from CSF Firewall if needed. Once SSH'd in via console, check if your ISP IP has been blocked by

    grepping csf firewall ips
    Code (Text):
    csf -g ISPIPADDRRESS

    if blocked remove your ISP IP address from /etc/csf/csf.deny and restart CSF Firewall
    or via command
    Code (Text):
    csf -dr ISPIPADDRESS


     
    Last edited: Sep 15, 2016