Web Access to account data
Making data available to the Web
If you just want the bare commands:
where "my_account" refers to your account name and "my_data_dir" refers to the directory of data that you want to make available.
The Longer Version:
As can be seen here, the WWW directory has been created. This is the Web Root directory for this account. Before it can be used though, a couple of things need to be done:
Security: By default, only the owner and the group that a new account belongs to can see the files and directories of the account. This is what drwxr-x--- (above) is showing. The last three permissions are blank, indicating that "Others" cannot access this directory. The web server running on Katahdin runs as user "apache" and is not a member of the "abol" group so the web server will not be able to get to this WWW directory. To change this, the following command needs to be run:
chmod o+x ~
Currently there is nothing in the WWW directory. Files can be copied into the directory but generally people want to keep their data where it is. The answer is to create a symbolic link to either a directory or file that points inside the WWW directory. In this case, we want to make the "data" directory visible to the Web, so we'll create a symbolic link with the command:
This says to create a link called /home/abol/WWW/data that points to /home/abol/data (remember that ~ refers to /home/abol for this user).
Now everything seems ready, and it kind of is but to make it easier for people to see the data files via the web there is another step. The web server doesn't allow people to view listings of files and directories by default. If people are given the full URL of a data file, they can get to it but they can't browse the directory. For instance, there is a single file in the ~/data directory called "data.txt". To get to this file, you can type in the following in a web browser:
And you should see in your web browser:
However, if you try to just go to: http://katahdin.acg.maine.edu/~abol/data you will get an error like:
This is because of the web server default permissions. To override these permissions a file called .htaccess needs to be put in the directory with a directive to override the defaults. You can do this with the command:
This should now make it so the URL: http://katahdin.acg.maine.edu/~abol/data will show you:
This should be enough to get you going with sharing your data via the Web. If you have any problems, please let us know.