Loading...
Wednesday 13 November 2013

HFS (File Sharing Server) First time configuration


If you connect to the Internet through a hardware router/firewall you will almost certainly have to configure your router in order to get HFS to work properly. .
Many firewalls also require that you give HFS permission to send and receive files.

Contents

  
  • 1 Summary
  • 2 Initial state
  • 3 Self Test
  • 4 Adding an upload folder
  • 5 Adding a download folder
  • 6 Addresses to give out
  • 7 Password protection
  • 8 Passwords and folder restrictions
  • 9 User accounts
  • 10 Saving your configuration
  • 11 HTML Editor and Templates
    • 11.1 Modifying Templates
    • 11.2 Changing Templates
    • 11.3 Background color
    • 11.4 Advanced example
  • 12 Running HFS as a Windows service
  • 13 Upgrading


Summary

This section explains what you have to do to establish a working, fully-secured and protected, HFS server. These tasks include:
  1. Starting and testing.
  2. Adding folders for upload and download.
  3. Determining addresses.
  4. Setting passwords.
  5. Defining user accounts.
  6. Saving a configuration.


Initial state

When you have configured your router, double-click the file named hfs.exe to start your server. Initially, it looks like this:First screen
Of course the "Address" in the above illustration is not the address you actually see on your server.


Self Test

Now make sure that your server is visible on the Internet, by using "Self Test". Click the option and follow the onscreen instructions. A successful test, popsup the following:
Selfok.png
"Self Test" is an amazingly powerful HFS feature. It not only checks Internet visibilty, it also attempts to automatically repair many common connection problems.
In general terms, if "Self Test" is successful you can be almost certain that the server is visible on the Internet, and is ready to accept and process upload and download requests. Equally, however, if it fails there is little point in continuing configuration until you have solved this connection problem. (Most often failure to forward port correctly.)
You'll see that the first Address displayed is now replaced by your normal IP address. Click "IP address" to see the various address-handling options available. But do not change it right now.
You can check your normal IP address at, 


Adding an upload folder

Next, add an upload folder so that your friends can easily send you files. This must be a real folder 
  1. Create a new folder on your hard disk eg. C:\Uploads, by using Window's Explorer.
  2. If you have "Add to HFS" in the Windows Explorer context menu, simply right-click on the folder and click this option. Then click "Real Folder" in the resultant dialog box.
  3. The alternative is to drag&drop the folder "Uploads" to the left pane of the server window named "Virtual File System".
  4. Make sure that "Uploads" is selected (ie. it has the focus). Use Upload →Upload for accounts →Anyone so that any of your friends can access this folder.
  5. You can password-protect "Uploads", but most users don't do this so that all their friends can upload files without any restrictions. (See "Password protection", below.)
  6. You may care to type (or paste) http://localhost/ into your Internet browser to check what your site's users will see when they access your site. Alternatively, use the Browserfunction in HFS.


Adding a download folder

Next, add a download directory so that your friends can easily download files from you. This can be a virtual folder (see HFS: Glossary), but for first-time use, it's probably easier to use another real folder. To do this:
  1. Create a new folder on your hard disk eg. "C:\Downloads", by using Window's Explorer. Copy some test files there, of the type you imagine your friends will want. MP3s, for example.
  2. If you have "Add to HFS" in the context menu, simply right-click on the folder and click this option. Then click "Real Folder" in the resultant dialog box.
  3. The alternative is to drag&drop the folder "Downloads" to the left pane of the server window named "Virtual File System".
  4. You probably should password-protect "Download", but, assuming your system is reasonably secure (ie. you have at least an updated firewall), it's safe to leave it without any restrictions for a few minutes while you complete configuration. (See "Password protection", below.)
  5. You can type (or paste) http://localhost/ into your browser to check what your site's users see when they access your site. Alternatively, use the HFS Browser function.
The HFS Virtual File System now looks like this:
061.png
http://localhost/ now displays this:
062.png


Addresses to give out

Your friends can now download any files you add to the folder C:\Downloads on your hard disk. You can either give them the address of your site,
025.jpg
or of the item (the folder "Downloads").
026.JPG
If you use folder names that contain spaces, the item address may include % signs and some unwanted digits. In order to make it more readable, you can use the HFS "URL Encoding" facility (Main menu in "Expert mode"). Uncheck "Encode spaces" to remove the % signs which conventionally represent spaces, and the superfluous digits. The item then becomes a little more clear and readable:
Warning
Many HFS users like to give their site address to their buddies while they are using a Chat or Messenger application. In these circumstances, you may find some difficulties if you attempt to send the more readable version. (The Messenger browser, for example, normally just freezes when it encounters a non-encoded space.) One solution is to just right-click on the address (or file, or folder, or item) in HFS, and use "Copy URL". You can then simply paste the address into your chat browser.
A neat solution that avoids any problems with this, is to only create folders with names (character strings) that do not contain spaces!
For example "Downloads", "Mother", "Music", "Catherine",etc.


Password protection

You can protect folders, files, other items, or your complete site, by assigning passwords. This is not the same as setting-up user accounts. (See below.)
To password protect the folder "Downloads", for example, click the folder to select it, then right-click and choose "Set user/pass". Then complete the dialog box: 081.png
After you've clicked "Ok", only those who use the correct username and know the password can access this folder. You'll notice that a locked icon appears next to the folder in HFS. 063.png
To remove the protection, click "Reset user/pass".


Passwords and folder restrictions

Some users get confused about the use of folder restrictions, and the "username/password" facilities, in HFS.
It is perfectly possible to have a highly secure HFS server without using the "username/password" facilities at all.
The best practice is to just protect your HFS folders. This a key difference between HFS and conventional file servers. Many have used conventional servers and discovered that you have to have an account and login before you can do anything.
HFS just isn't like that.
On this site for example, "rojetto" (whoever he is) has no account. But he can access the folders "Uploads and "4rojetto". He can't access "Downloads" (because he doesn't know the password). You can see that "Downloads" has a padlock icon, to show that it's locked.
049.png
You can also password-protect root.
051.png
Now "rojetto" (who still doesn't know the password) can see the folders, but can't access any of them.
For extra security however, you can set-up user accounts.


User accounts

Use the facilities in "Restrict access" to setup user accounts.
058.PNG
Assuming you haven't setup any accounts before, select the "Downloads" folder, and click "New account" to display:
059.PNG
Fill-in the "Username" and "Password" and click Ok.
Click "Restrict access" again to check that the acount has been established correctly.
If you click "All existing accounts", all users with an account (including the one you have just setup) must enter their username and password to access the "Downloads" folder.
If you click "No account", you effectively remove all username/password protection for the item.


Saving your configuration

If you have followed the process outlined above, you now have a simple, very easy-to-use HFS server that is fully-secured and protected.
The final task is to preserve your work by using "Save file system".
You are prompted for a filename to use. Many users find it convenient to use an incremental naming system, eg. "01.vfs", "02.vfs", "03.vfs", etc. But, of course, you are free to adopt whatever naming system you prefer.
Warning Do not attempt to change the default file extension;always use "vfs".

=================================================================================

HFS is an extremely feature-rich application. This section explains how to use some of the most popular features and options.


HTML Editor and Templates


Warning Some users have reported problems when displaying changes to sites in their default browsers. These problems can normally be solved by refreshing the browser cache ("Ctrl+F5" on most systems).
Although the default HFS template is perfectly satisfactory for many users, HFS makes it very easy to use a different template which can dramatically change the "look-and-feel" of your site. You can experiment very freely, since the HFS Editor includes a "Restore default" facilty, which imports the default *.tpl file supplied with HFS.
For example, here is the basic look of the "example site" viewed in Firefox:
064.png
And here is the same site after applying a new template:
066.png
(Note that the above pictures have been shrunk and truncated so that they are easy to view. In reality, the graph in the "black" template for example, displays (and works) perfectly.)

Modifying Templates

It is much easier to modify an existing template, rather than attempting to create one from scratch. You can find good examples of templates to use at the user Forum and at thissite.
You should be aware that an HFS template ( a *.tpl file) contains the raw elements from which HFS builds the final HTML. Strictly speaking, it is not actually HTML, but you'll find that the HFS editor seamlessly handles verified HTML files from the above sites if you change the extension to *.tpl.
Before starting, it is good practice to make a folder named "Templates" under your "HFS" folder. Eg. C:\HFS\Templates.
Follow this procedure to apply the "black" template illustrated above.
  1. Download the file named "Beta Black Template v3.htm" from Templates, and copy (or move) it to "Templates". If necessary, rename this file to "Beta Black Template v3.tpl" (ie. change the file extension) so the HTML editor can recognize it.
  2. In HFS, select "Edit HTML template" which opens the editor and automatically loads the current template (the default if you haven't made any changes).
  3. Click "Import" and, if necessary, navigate to C:\HFS\Templates. Select "Beta Black Template v3.tpl" and click Ok.
  4. When the new template is loaded into the editor, click "Apply", and then "Ok" (to dismiss the editor).
  5. In the HFS window, select root (/), right-click and then click "Browse it" to see the effect of your changes. Remember to refresh the browser cache ("Ctrl+F5" on most systems), if necessary.


Changing Templates


You may now choose to make some small changes to the template to see their effects. To do this:
  1. In HFS, select "Edit HTML template" which opens the editor and automatically loads the current template ("Beta Black Template v3.tpl" if you haven't made any changes).
  2. Navigate to the style section of the template, and find this line: "body, .row { color: #000000 }"
  3. In HTML, colors are normally identified by their hex value.
    "0D8BE9" represents a reasonably classic blue. Change the above line to this: "body, .row { color: #0D8BE9 }" and click "Apply".
  4. Go back to the main HFS window, select root (/), right-click and then click "Browse it" to see the effect of your changes.
  5. You'll notice that the entries in this part of the site are now displayed in blue. Remember to refresh the browser cache ("Ctrl+F5" on most systems), if necessary.
  6. If you wish to keep this change permanent in the template, click "Ok" in the HTML editor. If you don't want to keep the change, click "Undo".
067.png
The above illustrates the principles of a method for safely editing an HTML template. The main alternative is to save ("Export") the different template versions as you apply and verify changes.


Background color


One of the most dramatic visual changes is to change the background color. This is controlled by this line in the style section: body { margin:0; background-color:#51595B; padding:10px; color:#FFFFFF; }. Try changing the color value here to "#0D8BE9".
068.png

Click to enlarge





Not everybody is familiar with hex color codes. You may care to download the free Pixeur application. This "pick" tool allows you to click anywhere on your screen and display the corresponding hex value (among other things).


Advanced example


The following illustration shows the template called "!!!ledufe.tpl".
071.PNG







At first glance it may just look like a fairly clean variation of the default template, but it actually uses some very advanced features.
If you click on the "Google" logo towards the bottom of the screen for example, your browser goes directly to the Google site where you can immediately perform Internet searches.
The central part of this webpage:
  • Shows whether you are logged into the "Hamachi" network, (and permits autologin if you're offline).
  • Allows you to invoke and sign-in to Skype messenger and use Skype phone.
  • Lets you sign into Windows messenger.
  • Lets you access other Microsoft services.
The toolbar across the top allows access to further features, including "Site" navigation, further "Hosted Sites", and to change the type of "CSS" that actually constructs this webpage within the HFS browser, a site "Search" box, and this:
072.png
This lets you use a self-made set of "HFS Tools", manipulate your browser's bookmarks or "Favorites", and lets you stream music files to site visitors using your favorite MP3 player.
There are many examples of good templates, together with notes about their construction, in the Template Examples Gallery.


Running HFS as a Windows service


There are several good reasons to run HFS as a Windows service.
It ensures that HFS:
  • Starts before login and runs continually across multiple sessions.
  • Is secure against unintentional or malicious shutdown.
  • Can be automatically restarted in the event of failure.
  • Can be run at a specific time.
  • Can be executed with specific user rights and priority.
There are also several methods to achieve this. Under XP, the easiest way is to download this tray-icon utility by ledufe. It only works if you have Microsoft's .NET Framework 2.0, freely available at Microsoft website.
Extract the file from the zip archive, and place it in a suitable folder, eg. C:\HFS. Double-click hfs2Service.exe to display:
087.png
You'll notice that two files are added to the folder, named HFS-Service.exe and HFS-Service.ini.
Click "Create" to install the service, and then "Start". The confirmation message "RUNNING" is displayed, and the HFS icon is shown in the Notification Area.
In Xp, you can confirm that itis working properly by checking "Services" under "Administrator Tools" in the Control Panel. 091.png


Upgrading


New versions of HFS are released fairly frequently. Although you can always manually download the latest version from Download, the easiest way is use:
"Check for news/updates".
There is no need to stop your HFS server, or make any other preparations, although it is usually good practice to use "Save file system" just before installing a new version. If a new version is available, you first see an information box like this:
082.png.
Click "OK":
083.png.
Click "OK" to start the download and installation process. A "Dos box" like the following is displayed:
079.png.
After a very brief delay, you'll notice your server has been automatically stopped and restarted, and now displays the new version number in the title bar. It is good practice to check that everything is working properly by using "Self Test".

0 comments:

Post a Comment

Latest @ World's TOP 10

Contact

Total Pageviews

 
TOP