Providing HTTP access to GWS data

Setting up web access to a public directory within a GWS

You can make a JASMIN/CEMS Group Workspace (GWS) visible via a web browser or HTTP client by creating a "public" directory and placing content inside it. If you want to set this up please contact the CEDA Helpdesk to request this service for your specific GWS. This page describes how to set up restricted and unrestricted access to your "public" directory. If you require access control then see the section on password-protected access below.

In some cases the GWS manager may want to make some files and directories available over HTTP so that users (perhaps a wider audience than just the membership of the GWS) can access the data via a web browser or other http-based tools. This can be done by creating a public directory in the top-level directory of the GWS, for example:

$ cd /group_workspace/jasmin/foobaa/
$ mkdir public
$ chmod -Rf 755 public

You should then contact CEDA Support and ask for this directory to be made visible via the gws-access server. The CEDA team will configure this change and your public directory will then be visible from:

http://gws-access.ceda.ac.uk/public/foobaa/

Please see the section below if you wish to control who can access the content of one or more of the sub-directories within your "public" directory.

Setting up password-protected access to the "public" directory in your GWS

In order to restrict access to your "public" directory, and/or any sub-directories, you will need to create an ".htaccess" file within it. In turn the ".htaccess" file must point to an ".htpasswd" file which lists the usernames and encrypted passwords that have read-access to that directory.

NOTE: This method of access control is entirely separate and independent of the SSH login accounts used on JASMIN/CEMS.

In order to create the ".htpasswd" file you will need access to the "htpasswd" command. This is available on the following servers:

  • jasmin-xfer1.ceda.ac.uk
  • cems-xfer1.cems.rl.ac.uk

You can then create the ".htpasswd" file as follows (using the example of a Group Workspace called "foobaa"):

export GWS=/group_workspaces/jasmin/foobaa/
cd $GWS
mkdir -p public
cd public
htpasswd -b -m -c $GWS/public/.htpasswd i_am_a_user i_am_a_password

Before this will work, you also need to create an ".htaccess" file which you could do as follows:

cat >.htaccess <<EOL
AuthType Basic
AuthName "Password Required"
AuthUserFile /group_workspaces/jasmin/foobaa/public/.htpasswd
Require valid-user
EOL

Finally, change the permissions on these files:

chmod 644 .htaccess .htpasswd

Now, you can test that you get prompted for the username and password by visiting

http://gws-access.ceda.ac.uk/public/foobaa/
This website and others run by CEDA use cookies. By continuing to use this website you are agreeing to our use of cookies.