2. The installation
2.1 Language
2.2 Installation type
2.3 License
2.4 Database
2.5 Website
2.6 User account
2.7 Compatibility
2.8 Confirmation
2.8.1 Crossroads
2.9 Finish
2.10 Download configuration file
3. Tips for a secure installation
3.1 Program files and configuration file
3.2 Data files
3.2.1 Outside the document root
3.2.2 Inside the document root
4. After the installation
4.1 Virus scanning
4.2 Session name
4.3 Proxy friendly URLs
5. Errors
5.1 Cancelled installation
5.2 Unable to write in data directory
5.3 Config.php write problems
Data folder (cannot be changed later on): filename not acceptable: 'grade 8'
Confirmation or error messages will be displayed in this yellow bar. If necessary these messages can be copied and past in e-mail or forum posts for support.
index.php
: To indicate a file name.
You need some computer skills to install Website@School:
NOTICE:
It is very important for security reasons to set these permissions correctly. You want a secure website at your school to protect the confidential information that will surely be stored in the data directory. Next to that you want to protect your Website@School installation and your server against intruders. Specially paragraph 3. Tips for a secure installation discusses this important subject.
When you are uncertain about your skills, it's better to ask help at a local Linux group. They are virtually everywhere and are willing to perform a small service for the school and (possibly) your kids. See http://en.wikipedia.org/wiki/Linux_User_Group
Start with creating some place to download files if it not already exists.
/tmp
directory for the downloads.
In the home directory create a directory for the downloads, for example downloads
.
websiteatschool-0.90.0.zip
or websiteatschool-0.90.0.tar.gz
[ * ].
websiteatschool-manuals-en-0.90.0.zip
or websiteatschool-manuals-en-0.70.0.tar.gz
[ * ].
websiteatschool-languages-es-0.10.0.zip
or websiteatschool-languages-es-0.10.0.tar.gz
[ * ] for the Spanish language files.
When on a server with root access, proceed to the next paragraph. When the server where Website@School is to be installed is located at an ISP (Internet Service Provider), proceed with paragraph 1.3.3 Installing on a server without root acces
/home/httpd/htdocs
or C:\Program Files\Apache Group\Apache\htdocs
. Proceed as follows.
/tmp
directory, use the following command to unpack a .zip file:
|
When using tar, unpack with:
|
NOTICE:
The file is unpacked in the current directory.
|
We refer to this directory as the CMS Root Folder. In this case, the CMS Root Folder is the same as the webserver Document Root.
NOTICE:
Even though it is strongly recommended to install Website@School in the webserver Document Root, it is perfectly possible to install the program in a subdirectory of the webserver Document Root. In that case the webserver Document Root and the CMS Root Folder are not the same, hence the special name.
The program
directory contains the program files and directories. The manual and optional language packs were uncompressed there.
/home/httpd/wasdata
or C:\Program Files\Apache Group\Apache\wasdata
. The name wasdata
is an example. You can use any name. Here is an example of minimal permissions and ownership on the CMS Data Folder:
|
When you are familiar with the Linux command line, you know how to create a database. If not, try this example which we adapted from the ServerAtSchool documentation at http://http://serveratschool.net/doc/install/configuring.html#h7.
Below the login procedure is shown:
|
You are logged in now and ready to create a new database, with appropriate permissions and a new user, especially for the website database that will be accessed via the Webite@School content management system (CMS). Again, the commands to type are shown emphasised in the illustration below. The password 'ohF9quei' is used as an example. You should use a password of your own choice.
|
At this point you have created a new database named www and a user named wasuser who has been given full access to this database (but only from the host 'localhost'), provided the user produces the correct password, 'ohF9quei'.
The MySQL database is now ready for use. You can close the connection to the database and end the mysql program:
|
Examples of database names: www or example_www.
config.php
file exists. It is created during the installation.
NOTICE:
After finishing the installation and uploading the config.php
file, change its permissions to read for owner and group. Do not forget this! Paragraph 3. Tips for a secure installation discusses this important subject.
You are now almost ready to install Website@School. Please first read paragraph 1.4 On secure passwords, before proceeding to 2. The installation.
We assume you have downloaded the files in the downloads
directory as described in paragraph
1.3.1 Downloads, i.e. the downloads
directory is in the users home directory.
was
, in which you will unpack the downloaded files.
was
directory.
downloads
directory use your favorite tool or the command line to unzip:
|
|
NOTICE:
The file is unpacked in the current directory.
|
The program
directory contains the program files and directories. The manual and optional language packs were unpacked there.
NOTICE:
Depending on the ISP the name of the Document Root, i.e. the directory to put the Website@School program files and directory in, differs from ISP to ISP.
was
to the CMS Root Folder on the server. Do not forget underlaying subdirectories in program
NOTICE 1:
Create the Data Directory, if possible, outside
the Document Root and outside the CMS Root Folder.
NOTICE 2:
If it is not possible to follow the NOTICE 1 above, the Data Directory must be created in the Document Root.
Give this Data Directory a difficult to guess name,'for example b27b7d81c9ea26q4885734564qda2e12
.
Do not use this example, but create a difficult to guess directory name.
NOTICE
Necessary permissions are: read, write and execute for owner, group and perhaps world, too. Once installation is complete, all write
permissions of the Data Directory can be revoked again.
config.php
file exists. It is created during the installation.
NOTICE:
After finishing the installation and uploading the config.php
file, change its permissions to read for owner and group. Do not forget this! Paragrapfh 3. Tips for a secure installation discusses this important subject.
To create a database, you can use a program like phpMyAdmin. phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. It can be downloaded at http://www.phpmyadmin.net.
NOTICE:
Using a web based program like phpMyAdmin is a security risk. Do not forget to (re)move phpMyAdmin to a place where the webserver has no accces to.
You are now almost ready to install Website@School. Please first read the next paragraph 1.4 On secure passwords, before proceeding to 2. The installation.
Please bear this in mind when entering passwords during the installation. Nuff said, time to start!
The installation starts with the selection of the language in the dropdown menu. Please select a language and click [Next] to continue or [Cancel] to abort the installation.
To be able to install the progrma, you have to accept the license agreement by typing 'I agree' (without quotes) in the box.
Click [Next] to continue, [Previous] to return to the previous dialogue or [Cancel] to abort the installation.
NOTICE:
This option is not available in the Standard installation, but only applies to the Custom installation.
All table names in the database start with this prefix. This allows for multiple installations in the same database. Note that the prefix must begin with a letter. Examples: was_
or cms2_
.
Click [Next] to continue, [Previous] to return to the previous dialogue or [Cancel] to abort the installation.
NOTICE:
This option is not available in the Standard installation, but only applies to the Custom installation.
This e-mail address is added to outgoing mail and can be used to specify a mailbox where replies are actually read (by you) and not discarded (by the webserver software).
index.php
, config.php
, etcetera, e.g. /home/httpd/htdocs
or C:\Program Files\Apache Group\Apache\htdocs
.
index.php
can be visited. Examples are: http://www.exemplum.eu or https://exemplum.eu:443/schoolsite.
NOTICE:
This option is not available in the Standard installation, but only applies to the Custom installation.
The path to the CMS Program Folder. As default setting the path is not the same as the CMS Root Folder (usually the CMS Root Folder followed by /program). Examples /home/httpd/htodcs/program
or C:\Program Files\Apache Group\Apache\htdocs\program
NOTICE:
Do not change this path, unless you know exactly what you are doing!
NOTICE:
The folder name program
should not be changed.
NOTICE:
This option is not available in the Standard installation, but only applies to the Custom installation.
This is the URL that leads to the program
directory (usually the website URL followed by /program
). Examples are: http://www.exemplum.eu/program or
https://exemplum.eu:443/schoolsite/program.
It is very important that this directory is located outside the webservers Document Root [1], i.e. is not directly accessible with a browser. Note that the webserver must have sufficient permissions to read, create and write files here. Examples the the CMS Data Folder are: /home/httpd/wasdata
or C:\Program Files\Apache Group\Apache\wasdata
.
[1] With many ISPs (Internet Service Providers) you have no access outside the Document Root.
Click [Next] to continue, [Previous] to return to the previous dialogue or [Cancel] to abort the installation.
NOTICE: A user name consists of maximum 16 characters: lowercase (a-z), digits (0-9), underscore (_)and starts with a letter.
Click [Next] to continue, [Previous] to return to the previous dialogue or [Cancel] to abort the installation.
Below is an overview of required and desired settings. You need to make sure that the requirements are satisfied before you continue.
NOTICE:
Required items have an '*' asterisk.
php.ini
file.
NOTICE:
Not required but strongly advised. In php.ini
set safe_mode = Off
.
NOTICE:
Take care! Do not set this folder world readable!
You are about to install your new website. Carefully check the configuration settings. Please do as suggested and print this page for future reference.
Thereafter you can press [Next] to start the actual installation process or press [Previous] to correct errors, or [Cancel] to abort the installation.
The installation process may take a while.
config.php
was automatically written to the CMS Root Folder. You see a picture as in 2.9 Finish. Proceed from there.
config.php
was not automatically written to the CMS Root Folder and it must be put there by hand. Please proceed with paragraph 2.10 Download configuration file.
The installation is finished.
It's not a bad idea to check for updates or bug fixes. We assume your version is up to date. Proceed by selecting an item from the dropdown menu:
Jump to:
Or click [OK] to go to the default destination: the admin.php
login dialogue.
You can now continue reading the manual with the Logging in and out chapter. Or select one of the other options and click [OK] to go there.
config.php
in the CMS Root Folder because the directory is write protected. In that case, you have the option to download config.php
. You can save it in the was
directory on your computer and copy (upload) it with FTP to the CMS Root Folder. This feature is a security measure.
To download the file config.php
, proceed as follows:
Select the was
directory on your computer (see also 1.3.3 Installing on a server without root access)
to save the config.php
file.
Jump to:
Or click [OK] to go to the default destination: the admin.php
login dialogue:
You can now continue reading the manual with the Logging in and out chapter. Or select one of the other options and click [OK] to go there.
This paragraph discusses the points to check for a secure installaton. However, it is impossible to describe all possibilities and their exceptions. Do not hesitate to ask help from a local Linux group or ask for support.
All program files of Website@School are installed in the so called CMS Root Folder. The CMS Root Folder is often the same as the webserver Document Root. However, it is also possible to use a subdirectory of the webserver Document Root instead.
Furthermore, for a good installation a separate Data Directory is necessary. After installation is complete, this Data Directory will contain the CMS Data Folder.
|
The CMS Program Folder program/
contains dozens of files and subdirectories. Together these form the Website@School program.
Finally, there is the configuration file config.php
.
This file (which is created by the Install Wizard) must be placed in the same directory as the other files, i.e. in the CMS Root Folder.
It is sufficient for the webserver (Apache) to only have read permissions on all these program files and subdirectories. This also applies to the configuration file config.php
.
Security wise it is best to make sure that the webserver (Apache) has no write permissions on these program files and (sub) directories. This also applies tot the configuration file config.php
.
For additional security and protection of the data in config.php
it makes sense to limit the permissions on that file even further.
On a Linux server it speaks for itself to set these read- and write permissions as follows:
- All files, with the exception of config.php
, get permissions 0644 and are owned by user root and group root.
- Al directories get permissions 0755 and are owned by user root and group root.
- The file config.php
gets permissions 0400 and becomes owned by user www and group root.
NOTICE 1:
It is also possible to give the files (except config.php
) permissions 0444 and the directories permissions 0555, but this adds factually little when the files are owned by user root, because anyhow user root has all permissions, also write permissions, on any file.
NOTICE 2:
In this example user www is used as the account under which the webserver (Apache) is running. Depending on the specific system, this can also be the user apache or nobody. Please consult the documentation and/or configuration of the webserver.
NOTICE 3:
The file config.php
is a case on its own. This file contains the database password. For that reason it is good to only and exclusively give the webserver (Apache) read permissions on this file and no other user or group.
NOTICE 4:
If it is not possible to make the files (except config.php
) and directories owned by user root and group root, then it is also possible to choose another user and group, as long as it is not the webserver user and group for that purpose. Permissions 0644 or 0755 are usable.
/home/httpd/wasdata
.
For security reasons the installer creates a subdirectory inside this directory: This we call the CMS Data Folder. The full path of the CMS Data Folder is the Data Directory path followed by a difficult to guess directory name of 32 letters and digits, for example:
/home/httpd/wasdata/b27b7d81c0ea26c4885784564bda2e11
.
It is necessary that, during the installation, the webserver (Apache)
has read-, write- and execute permissions in the Data Directory (for example wasdata
), in order to create the CMS Data Root.
After finishing the installation the write permissions can be minimised, as long the read and search permissions for the webserver remain.
Example 1:
On the Linux server /home/httpd/htdocs
is the webserver Document Root. In that case a secure choice for the Data Directory is /home/httpd/wasdata
. This results in:
- Data Directory: /home/httpd/wasdata
- CMS Data Folder: /home/httpd/wasdata/fa0aff7743cd61f2afb473ca528fd431
During the installation, the Data Directory must have permissions 0700 with user www and group root. After finishing the installation, it is sufficient to set the permissions of this directory to 0500 with user www and group root.
Example 2:
On a Linux server /var/www
is the webserver Document Root. The Data Directory could be located in /var/wasdata
. This results in:
- Data Directory: /var/wasdata
- CMS Data Folder: /var/wasdata/fa0aff7743cd61f2afb473ca528fd431
During the installation, this Data Directory should have sufficient file access permissions, e.g. by -- temporarily -- elevating permissionss to 0777, with user wblade and group users. After finishing the installation, it is sufficient to set the permissions of this directory to 0555 with user wblade and group users.
User wblade is Wilhelmina Bladergroen, the systems administrator of the Exemplum Primary School. For explanation on this user and the school see the ServerAtSchool documentation at http://serveratschool.net/doc/manual/overview.html#h2
NOTICE:
The permissions and ownership of the underlying directories created by the Installation Wizard, must remain as they are. Here is an example:
|
Example 1:
On a Linux server /home/httpd/htdocs
is the webservers Document Root. If the Data Directory and hence the CMS Data Folder is to stay in there, then
b27b7d81c9ea26q4885734564qda2e12
looks like a good, difficult to guess subdirectory name. This results in:
- Data Directory/home/httpd/htdocs/b27b7d81c9ea26q4885734564qda2e12
- CMS Data Folder: /home/httpd/htdocs/b27b7d81c9ea26q4885734564qda2e12/fa0aff7743cd61f2afb473ca528fd431
The permissions of the Data Directory during the installation are 0700 with user www and group root. After the installation permissions 0500 with user www and group root are enough.
Example 2:
On a Linux server /var/www
is the webservers Document
Root. If the Data Directory and hence the CMS Data Folder is to stay in there, then b27b7d81c9ea26q4885734564qda2e12
looks like a good, difficult to guess directory name. This results in:
- Data Directory: /var/www/b27b7d81c9ea26q4885734564qda2e12
- CMS Data Folder: /var/www/b27b7d81c9ea26q4885734564qda2e12/fa0aff7743cd61f2afb473ca528fd431
During the installation, the Data Directory has --temporarily-- permissions 0777 with user wblade and group users. After the installation it is sufficient to set back the permissions of this directory to 0555 with user wblade and group users.
User wblade is Wilhelmina Bladergroen, the systems administrator on the Exemplum Primary School. For explanation on this user and the school see the ServerAtSchool Documentation at http://serveratschool.net/doc/manual/overview.html#h2
NOTICE:
The permissions and ownership of the underlying directories created by the installation wizard, must remain as they are.
NOTICE:
Before making use of your installation, please also read the next section to check some of the configuration items that affect security.
First check at [ ] Scan files for viruses on upload, the box is checked. Then perform the following test to verify the correct operation of the virus scanner by creating a special 'test virus'. There is a standard test, developed explicitly for testing antivirus programs. It was developed by the European Institute for Computer Anti-Virus Research (EICAR). You can easily create this test using any text editor. The test file consists of 68 plain ASCII characters as shown below. Note that the 3rd character is a capital 'O' and not the digit '0'.
X
5O
!P
%@
AP
[4
\P
ZX
54
(P
^)
7C
C)
7}
$E
ICAR-STANDARD-ANTIVIRUS-TEST-FILE!$
H+
H*
Now store these 68 characters in a file. Do not name it EICAR.COM, as suggested by the Institute, because by default the file extension .com
is a not allowed extension in Website@School. Maliciously we rename it to image.png
, so it will be accepted and uploaded to your My Files location.
The virus should be detected and an error message must be generated like:
If the virusscanner is properly installed and found during installation, but it is for some reason not working during the upload, a message like the following is displayed. Notice 'Error 2'.
Filename(1): Error 2 while scanning for viruses, file 'other_image.bmp'
Files added: 0, files ignored: 1
.
NOTICE:
Do not forget to keep the virusscanner on the server up to date!
More information on EICAR.COM can be found on the EICAR web site at http://www.eicar.org/anti_virus_test_file.htm.
Note that this EICAR.COM file in itself is a valid but harmless DOS program. When executed (in a DOS box), it simply displays the text 'EICAR-STANDARD-ANTIVIRUS-TEST-FILE!', nothing more.
This sub paragraph on testing with a virus is gracefully copied and slightly adapted from http://serveratschool.net/doc/, the ServerAtSchool Documentation, where the installation of a secure school server is discussed.
config.php
configuration file. This is a security feature that prevents overwriting an existing configuration file. Check if the file exists. If this is the case, either delete or rename it. You cannot accidently overwrite an existing config.php
file while doing a new installation of Website@School, even when the file permissions would allow it.
Click [OK] to return to the language selection. It is possible to download the config.php
file. See paragraph 2.10 Download configuratoin file.
Error: Data directory: directory can not be created: /home/httpd/htdocs/wasdata/6a69137e2689c8f91873e0634ca46bda.
You get the same type of errors when the file permissions are too low (for example 000 or 600). Here is an example of minimal permissions and ownership:
|
config.php
because the directory is write protected. In that case, you have the possibility to download config.php
and save it on your computer. Then copy it to the location you choose to put the program in. This feature could be seen as a security measure.
[1] For example when Website@Schools CMS Root Folder has permissions like:
|
It is impossible to write in the directory.
Author: Dirk Schouten <schoutdi (at) knoware (dot) Last updated: 2012-02-29