Peng Zhang on April 29th, 2012

These are my links for April 17th through April 29th:

Peng Zhang on April 13th, 2012

These are my links for April 13th from 01:26 to 14:25:

Peng Zhang on April 10th, 2012

These are my links for April 4th through April 10th:

FTP is an unsafe protocol.

  • avoid using FTP as much as possible;
  • never use the credentials of the hosting customer account for FTP, even though many hosts allow that to be used for FTP as well;
  • use the file manager provided within cPanel for uploading files, as a secure option;
  • test out the WebDisk feature in cPanel if it is available for drag and drop access to the files on the server;
  • ask for SSH access to the account, and use WinSCP to securely upload or download files in place of FTP; Note SSH can cost $$$, with hostgator, it’s a one-time fee of $10;
  • create an FTP account that is sandboxed into a particular folder, if FTP cannot be avoided; this will limit the damage to just that folder if the FTP credential is compromised;

Tags: , , ,

Peng Zhang on April 4th, 2012

These are my links for April 1st through April 4th:

Peng Zhang on April 2nd, 2012
  • set up a folder outside of the public_html folder so that it is not accessible from the web, and backup files are not included in backups;
  • place a sh script in the folder; I call it back-www.sh; in the sh file, I include
    cd /home/useraccount/folder-for-backup;tar czf sitename-$(date +%Y%m%d).tar.gz -C / home/useraccount/public_html

    if “-C /” is not included and “/” immediately precedes “home”, there will be an warning “removing / from member names”, but the archive would be successfully created nonetheless;

  • go to cPanel/crob jobs, set the time, and enter “/bin/sh /home/useraccount/folder-for-backup/backup-www.sh” in the command line.
  • sh file should not include returns which seems to trigger errors on the *nix servers; I used the code editor provided by the file manager to edit the sh file to remove the carriage returns; I guess it is because of the Windows and Nix differences;
  • the sh file does not seem to require higher executable permissions, the file permission was changed to 0644 after being edited by the code editor, but the runs successfully no problem;
  • when a successful crob job is run, hostgator does not send out an email; but if there is a warning or error, an email will be sent to the email specified;

Resources:

Tags: , , ,