Offering Large Files via the Internet

Large files should not be transmitted via e-mail, especially when sent to a large number of recipients. This document describes how you can provide access to such files over the Internet.

 

linux logoUnix/Linux:

Initial Steps

The user must create a new subdirectory with the name www in his AFS home directory with the command:
mkdir www
In the file system the user has to set the ACL (Access Control List) values
with fs setacl. How to do it for your directory www:
fs setacl -dir www -acl wwwzdv read
With it the web server gets read permission. (With the AFS command fs listacl you can list the ACL permissions and with fs setacl you can set them. Revoke the access rights for all unwanted accounts.)

Offering the files

You place the large (already compressed) files in the created directory. Access can be got through:
http://www.desy.de/~username/filename
You have to replace 'username' with your login name and 'filename' with the name of your file.
You make it easier to choose an offered file, if you also write a start page with the name index.html. On this page in HTML format you can write some explanation and the names of the files you want to provide as links. Access then can be got through:
http://www.desy.de/~username/index.html
An example (you can also copy) is shown below.

Attention: Because under Unix directory browsing is allowed, by using
http://www.desy.de/~username

the list of all files in the directory www is shown, if an index.html is not available. If you do not want that visibility, create a file called index.html! Please see Control directory listings

How to restrict the access

If you want to restrict the world wide access to your pages, you have to put a .htaccess file into the directory www. If you want to give access to a number of known people only, the following example shows how to do it:

 SSLRequireSSL
 AuthType Basic
 AuthName weather pages
 require user account1 account2 account3...



Explanation: For security reasons you should always use the first row 'SSLRequireSSL', if passwords shall be given. (The .htaccess restricts to ..., SSL encodes page and password.) Access in general is got through https://..... 'AuthType' must be 'Basic', if restricting by usernames/passwords is done. For 'AuthName' specify whatever you think is appropriate. It shows up when a user is prompted for a password. In the last row only account1, acount2, account3... have to be replaced (with an afs account name at DESY).

 

Hint: If you want to start the file .htaccess under Windows, e.g. you open the program 'Editor' via the entry 'Accessories' within the start menu. In order to apply a file name beginning with a dot, during 'save as...' for 'Save as type' you choose 'all files'.
Further information: Personal web pages at DESY

Example for web page index.html

View of the web page:
screenshot browser

Source code of the web page, if xyz.pdf is included in the directory www:

screenshot code

Template to save

This link you can use to save the template. Mozilla: Please click on the link and then into the right frame/ Internet Explorer: right click -> open in new window. Then choose:
file -> Mozilla: save frame as->/ IE: save as-> In the field 'Save in' you choose the path to your directory www, as 'File name' you write index.html. In 'Save as type' you choose 'Web Page, HTML only'. Depending on the program for example it could also be named 'HTML Files'.

screenshot saving file
This file you can edit to change the specified file name in it and so on...

Additional Information

If you do not want to offer your files on the web, another secure way to transfer files is scp (secure copy) which uses ssh (secure shell) to establish a connection and transfer files. At DESY it is also possible under Windows, because via NetInstall for example you could install WinScp or SSH for Workstations. If you want to use scp, you have to own an account on both systems that are involved.
For further information see

ssh/scp Howto

Contact: uco@desy.de