How To Sync QNAP Shares To Amazon Drive

In this video, I’m showing you how to sync up your QNAP shares to Amazon Drive.  Enjoy!

Advertisements

A Solution To Cannot Access Network Shares On Windows 10 Preview

I’ve been testing Windows 10 Preview version out lately.  So far, I think the graphical user interface of Windows 10 is definitely an upgrade over all previous Windows versions.  Let me simply put, I like Windows 10 overall look!  Of course I’ve been encountering several bugs since I’m using Windows 10 Preview version, and within this blog post I want to address one specific bug that has gotten me so annoyed lately.

If you set up PIN as your log-in password for Windows 10 Preview (version 10147 and previous versions), then after next log-in session your network shares will not be accessible.  Even you have already mapped a network drive, it will be disconnected and unavailable for the next log-in.  Rebooting computer won’t help!

The solution is to reset the PIN, but don’t create new PIN!  If you reset the PIN, it will ask you to create new PIN.  If you refuse to create new PIN, then the PIN won’t be available as password log-in method.  Once you have done this, you can use the Picture log-in method and other log-in methods, except for PIN log-in method, to log into your Windows 10.  Once you access your Windows 10 after the abandonment of PIN log-in method, you will notice that now you can access network shares.

Good luck to you!  For now, I like to end this post here.  Of course, I’m going to try to play around with Windows 10 Preview version and whatever Preview version that will come out later, and I’ll write up some more about my experience with Windows 10.  For now, let’s say I’m still experimenting with Windows 10 Preview version 10147.

How To Permanently Map Network Share To Mac OS X Yosemite

Awhile back I had made a video which shows Mac beginners how to permanently add a network share/drive to Mac OS X Mavericks.  This very video is still applicable for Apple’s newest OS X Yosemite.  Just in case anyone really needs to know this trick, just watch my video right after the break.  Here once again, I repost the video.  Enjoy!!!

Adding .htaccess File To QNAP’s /share/Web/ To Secure All Web Applications Within

Legal Disclaimer:  Following the tip within this blog post at your own risk.  You have been warned, thus you know that you are going to do something dangerous here to your web server or QNAP server.  With this knowledge of yours and by having reading this warning or skipping this clear warning, you cannot hold me for your stupidity or dangerous action against your very own QNAP server or web server or against anyone’s web server that you’re responsible for its administrative duties and procurements.

Are you running a web server on QNAP NAS?  NAS stands for Network Attached Storage server.  If you are for whatever purpose, whether this web server is for production purpose or testing purpose, you might want to know that .htaccess file can help secure QNAP’s web applications such as WordPress, Drupal, and the rest.  Here’s how to create proper .htaccess file that controls all web applications at once on your QNAP server.

  1. You need to change into directory of /share/Web by using this Linux command [cd /share/Web].  Of course, please do ignore the square brackets as these are only for clarifying the command line.
  2. Quickly do [ls -la] to figure out if you have an .htaccess file already.  If you do, please make a backup of this file in case you need this original file again for whatever purpose.  To make a backup of this .htaccess file that you already have had in the QNAP’s /share/Web directory, use this command [cp -p -a /share/Web/.htaccess /share/Web/.htaccess-old].
  3. Once you had followed the step #2 herein, then you can try to remove the original .htaccess file (Not the backup one you just made OK?) by using this command [rm -rf /share/Web/.htaccess].  Be very careful with [rm -rf] command line, because if you misspell a file or a directory you’re trying to remove, you will definitely lose such directory or file forever and won’t be able to recover it.
  4. Now let us create the .htaccess file again, but this time we’re creating it the way we like it.  Of course, .htaccess is a complex file, thus regular Joe like us needs not to worry about making this file too complex.  Instead, let a regular Joe like us to just create simple .htaccess file that denies all IP addresses but only allows a specific IP addresses.  This means, if you want to allow one or two specific IP addresses to access QNAP’s web applications, this .htaccess file should satisfy your command.  So here we go…
    1. Creating .htaccess file by using this command [touch /share/Web/.htaccess].
    2. Now, let’s edit the .htaccess file we just created by using this command [vim /share/Web/.htaccess].
    3. Let’s enter the lines below for our new .htaccess file shall we?  These lines must be in the order as follow…
      1. order deny,allow
      2. allow from 192.168.0.x (please use your very own IP address here)
      3. allow from 192.168.0.x (please use your very own IP address here)
      4. deny from all
    4. What we had done was adding 2 IP addresses to the allow list in .htaccess file so these 2 IP addresses will be able to interact/access the web applications that reside in QNAP’s /share/Web directory.  You can add more IP addresses or remove most IP addresses but allowing only one according to your desire by simply adding more [allow from…] or remove [allow from…] lines.  Of course all [allow from…] lines must be written or typed out above the line which said [deny from all] and below the line which said [order deny,allow].  Now, we must save our newly edited .htaccess file by doing this while you’re still in the vim editor.
      1. Hit escape key on the keyboard to exit the editing mode.
      2. Type in [:wq] and hit enter key on the keyboard.  Of course, please do ignore the square brackets as these are only for clarifying the command line.
  5. The last step is to secure our new .htaccess file by doing two things.
    1. First thing to secure is to make sure the owner and the group owner of the .htaccess file are indeed the right owner and group owner.  For me personally, I prefer to not use admin user and administrators group for any web application files and directories, because I don’t want the evil doers to be able to use one of these files with high privilege access to escalate the privilege and execute malicious commands.  This is why on my QNAP server I rather make most of my web applications’ files and directories in the name of user httpdusr and group owner everyone.  So let’s do this command to make this happens OK?  Type in [chown httpdusr:everyone /share/Web/.htaccess].  Afterward, just do [ls -la /share/Web/.htaccess] to see if .htaccess file indeed is using user httpdusr and group owner everyone.
    2. Second thing to secure is to make sure the .htaccess file has the right permission.  So we need to use this command [chmod 400 /share/Web/.htaccess].  What this command does is change the permission of .htaccess file in /share/Web directory to read only for user (owner of the .htaccess file) and no other permission is allowable for anyone else, hint the two zeros after #4.  These two zeros stand for no permission for group user (whoever has the group authorization of whichever group) and no permission for everyone else (this is the last 0 for).  Finally, you can do [ls -la /share/Web/.htaccess] to confirm that the permission for .htaccess file is indeed 400 or not.  If it’s so, it means only the QNAP web server user httpdusr will be able to read the file, but even this user cannot write to or execute whatever within this .htaccess file.

Now, with this .htaccess file configuration for your QNAP’s /share/Web directory, the web applications that are residing within this specific Web directory will not be accessible to anyone with any IP address unless somebody is using the IP address that is being allowed by this very .htaccess file.

Do you know that by following the tip herein, you can also use this very tip for non-QNAP web server?  Just create a similar .htaccess file within whatever web server’s directory to prevent snooping to most IP addresses and allow only the IP addresses that are being allowed within.

How To Use CrashPlan To Backup Data To QNAP And Backup QNAP’s Data To CrashPlan Central

Normally, CrashPlan won’t allow you to backup computer data to network share/drive.  Nonetheless, you can get around this if you’re using iSCSI.  In the video right after the break, I show you how to create iSCSI with QNAP (Network Attached Storage) server,  connect to QNAP’s iSCSI target, and format iSCSI share as NTFS share for Windows 7/8.  This way, you can use CrashPlan software (free or paid) to backup data from a local computer to QNAP’s iSCSI share, and you can go one step further by backing up the data of iSCSI share (on QNAP or whatever NAS that may be) to CrashPlan Central (cloud service for hosting backup data).  Enjoy!!!