2. New installation
2.1 Requirements
2.2 Installing SyndeoCMS on a Windows 2003 Server with IIS 6.0
2.3 Unpacking the software
2.4 Setting ownership of files and directories
2.5 Taking the 8 steps
3. After the installation: security
3.1 Linux and security
3.2 PHP mail function
4. Building your site; some advice
5. Migrate from Site@School 2.4.10
5.1 Upgrading and your language files
In IIS 6.0 you have to create an extra web service
extension and just name it for example PHP.
Point it to php.exe and to php4ts.dll.
To unpack the file in Linux, according to the file you downloaded, do:
tar xzvf
syndeocms-<version-number>.tgz
or
unzip
syndeocms-<version-number>.tgz.
In Windows, use your favorite unzip program. 7-Zip is a good OSS/GPL zip/unzip program, downloadable at http://www.7-zip.org/.
Find out who is the user and group of the Apache webserver. Check the file /etc/httpd/conf/httpd.conf and look for 'User' and 'Group'. It is in 'Section 2 Main Server Configuration'. You find a user and group for the webserver, names like: 'apache' or 'www' or 'nobody'. Let's assume you find the user and group 'www'.
Now go to your document root directory. It will be something like '/home/httpd/html/', or '/home/httpd/htdocs/', or '/var/www/'.
Execute, as user root, the following commands:
# chown -R www.www starnet # chown -R www.www agenda # chown www.www index.php # chown www.www print.phpThese commands will recursively change the ownership of the directories and their contents and the two files to user and group 'www'.
NOTICE: Correct ownership of directories and files is a necessity to ensures the correct working of the installation script.
Wrong ownership of directories and files is often a cause of errors or unsuccessfull installations.
When you install SyndeoCMS at an ISP (Internet Service Provider), ask them for the correct ownership of your SyndeoCMS files and directories.
We will now explain the 8 steps in detail.
Here the installation steps are explained. Read them and click on 'Continue'.
The right input field is reserved for the directory where SyndeoCMS is located. There is no leading or trailing slash!
Examples of entries in the right field:
NOTICE: The server path, i.e. the combination of the document root path and the starnet directory must yield a valid path.
Check all the fields and when they are correct, click on 'Continue'.
NOTICE: It is considered a security risk to have 'root' as the MySQL user. Better choose another username.
NOTICE: When every SyndeoCMS user uses the same database name, you make life a bit easier for an eventual cracker. Better use another name. Keep it short.
NOTICE: When every school that uses SyndeoCMS uses the same database prefix, you make life easier for an eventual cracker. Better use another prefix. It's easy to separate your prefix and the table name with an '_' (underscore, omit the quotes). Do not start the table name with a number. MySQL does not allow this.
Check all the fields and when they are correct, click on 'Continue'.
NOTICE: Your installation will end in step [8].
When choosing 'No', a basic installation will be done without 'anything'.
NOTICE: Your installation will end in step [8a].
The first one (Yes) is the right one when you are testing SyndeoCMS. The second one is advisable when you want to start your site 'from scratch'.
Ofcourse it is possible to choose 'Yes', test SyndeoCMS and then remove all data, modules and sections and start building the site.
Make your choice and click on 'Continue'.
Check all the fields and when they are OK, click on 'Continue'.
You have successfully performed the SyndeoCMS installation on your system.
Print this page or copy the data and keep it in a safe place.
You have successfully performed the SyndeoCMS installation on your system.
Print this page or copy the data and keep it in a safe place.
You can click on 'here' or on the 'Login' button to log into the system.
You see:
On 2.4 sites passwords are encrypted in the mysql database and therefore a different procedure is followed:
For further details, see Password encryption.
Now you should see:
Prior to this screen you must have seen an unpleasant warning message. For security reasons, read 'After the installation'. After that you can enjoy SyndeoCMS.
When you want to serve files with the webserver Apache, it is only necessary to apply the 'x' bit on directories. When the 'x' bit is set for files, you actually just say that this file is an executable file (on the *nix server). For images etcetera that is not relevant and it is even better
A user on a *nix machine can be member of several groups.
When a 'normal' user (let's say the user 'mortaluser'; the one with the ftp-client) wants to put something in a place where Apache can also access it, the following minimal possibilities exist. FIXME: fore waht.
In this case all members of the group wwwgroup can read files and read and search directories. That's good enough to serve files. Condition: 'mortaluser' must be member of group 'wwwgroup'. Which is not always the case.
In this case the detour via 'world-readable' and/or 'world-executeable' is the only solution because 'world' membership is the only communal property between 'wwwuser' on the one hand (who must be able to read the files) and 'mortaluser' on the other hand (who offers the files, among others to the webserver).
Here 'mortaluser' can do nothing because he has no rights to write; only 'wwwuser' has write rights. Uploading files with a PHP-script will work, because the PHP-script very probably is executed as 'wwwuser' who may create files in the directory or write in existing directories.
Also here 'mortaluser' can do nothing because he has no write rights; only 'wwwuser' has write rights or another user who is member of the group'wwwgroup'.
Here 'mortaluser' may write files, but that is only because everybody is allowed to write.
This is the least restrictive to exchange files between
'mortaluser' and 'wwwuser'.
When you want to use one of the options, the best thing you can do is test them. Start with the most restrictive and see if it works; i.e. if you can uplaod files and make them visisble via the webserver. If not, use the next less restrictive option, and so forth. It is a matter of trial and error.
Also with this explanation, the practical side can be difficult. Because of the varyity in *nix-server, the many idffering policies of ISP's and the complexity of the subject. The final answer on the question of the 'right' file permissions and ownership of SyndeoCMS migt very well be: "That depends...". So far the exmplanation.
Maybe we can make the case practical.
The following table shows the different file permissions which can be set in SyndeoCMS working environment (configuration) .
Plesk = Multi-platform control panel for service providers, often used by users to manage their website.
Now, let's be practical. After a successfull installation, as a minimum you have to secure the /starnet/configurationn/database.inc.php file. During the installation this file's permissions were set to 0777. This means that everyone can see the loginname and password of your database.
When you have SyndeoCMS hosted at an ISP, ask them for the securest permissions. By now you we assume you will have understand that a permissions ending on 7, 6, or 4 are absolutely unacceptable for the file database.inc.php.
Acceptable are 0640 or 0660.
More security is needed. However, other files and directories need less tight permissions in order to upload files etcetera.
To end we give a few tips to get thighter permissions.
NOTICE: It's a good idea to check the ownership of the httpd root directory 'htdocs' for example. IT shouls hve 0750 permissions and be owned by the webserver.
First you set everything to the most restrictive polich, for example:
NOTICE. The above procedure is normally only possible on your own server. If you have an ISP, probably not all commands are allowed.
Do not forget to delete the contents of the /starnet/install directory.
If the mailing doesn't work you can use SMTP , then you need to change the file /starnet/core/class.phpmailer.php with the following:
NOTICE: Take the following steps in this order to prevent many problems!:
Long filenames and SyndeoCMS. SyndeoCMS is picky about filenames.
NOTICE: When things are still not clear, visit our Forum.
Give a complete and detailed description of your problem. "The news module is not working!", is a description we cannot do anything with.
Example:
Do not forget to delete the contents of the ../starnet/install directory.
From version 2.4 on you can retain your changes when upgrading. Do as follows:
- When you did not have an older version and are installing version 2.4, there is no need to do anything.
When you make changes to your language files,
the filenames of the language files will automatically be changed from (for example, when using Dutch as preferred language) NL.php to NL_user.php.
Also in future versions, your own changes will be retained.
After the 2.5 upgrade, you will need to load the changed language files once in the translate tool and press 'Save'.
By pressing save the newly introduced language items of 2.4 will be added to your NL_user.php file. The same goes for future versions.
To install new modules run the corresponding install scripts from the directory ../starnet/install.
Now we will discusss these options.
"I changed something in SyndeoCMS management and it's not visible on the site!"
Check if all parameters are marked 'OK'.
NOTICE: After using the script, rename it back to 'syndeo_check.txt' and set its permissions to 000. These are safety precautions. You should not give information about your configuration to the world!
NOTICE: Keep in mind that having PhpMyAdmin installed on your site is a security risk! Take measures to prevent unauthorized acces. It can ruin your database. A good security measure is to install phpmyadmin in a directory with a made up name and, after using PhpMyAdmin, set the permisions to to the directory to 0000.
To solve this problem, reead the installation instructions '2.4 Setting ownership of files and directories'.
TIP: Give the directory and the database the same name.
When asking for help, please state:
Give a complete and detailed description of your problem. "The news module is not working!", is a description we cannot do anything with.
A file or directory has an owner ('user') with the corresponding permissions and is also part of a group ('group'), also with corresponding permissionns.
The webserver runs as a certain 'user', for example 'wwwuser'. The useraccount of the webserver is often also member of a special group, for example 'wwwgroup'.
File permissions: rw-r----- (0640) and owner mortaluser.wwwgroup.
Directory permissions: rwxr-x--- (0750) and owner mortaluser.wwwgroup.
File permissions: rw-r--r-- (0644) and owner mortaluser.mortalgroup.
Directory permissions: rwxr-xr-x (0755) and owner mortaluser.mortalgroup.
File permissions: rw-r--r-- (0644) and owner wwwuser.wwwgroup.
Directory permissions: rwxr-xr-x (0755) and owner wwwuser.wwwgroup.
File permissions: rw-rw---- (0660) and owner wwwuser.wwwgroup.
Directory permissions: rwxrwx--- (0770) and owner wwwuser.wwwgroup.
Uploading via a PHP-script works, because the PHP-script very probably is executed as 'wwwuser' who is allowd to create files in the directory or may write in existing files. And, in case the PHP=script has no rights on that ground, then membership of the group 'wwwgroup' is also a ground on which write rights can be granted.
File permissions: rw-rw-rw- (0666) and owner wwwuser.wwwgroup.
Directory permissions: rwxrwxrwx (0777) en eigenaar wwwuser.wwwgroup.
Maybe 'mortaluser' can become a member of 'wwwgroup'; then everything works with permissions 0660/0770 and files/directories owned by group 'wwwgroup'.
Maybe the webserver can run under user 'mortaluser' and/or
'mortalgroup'. Then 'mortaluser' and Apache must have something in common but not permissions on 'world' level. In this case permissions can be 0600/0700 or 0660/0770.
Assumption is that the starnet/media directory is owned by the userid of the Apache webserver and not the userid of the user who uploads the files.
Possible file permisssions table
Permission
SyndeoCMS directoryFile upload SyndeoCMS Visible on web
FTP/Plesk
view directoryFTP/Plesk
file deleteFile
permision
0700 yes yes no no 644
0750 yes yes no no 644
0755 yes yes yes no 644
0770 yes yes no no 644
0777 yes yes yes yes 644
FTP = File Transfer Protocol
To ensure the file is not world readable, change its permissions to 0400 (best) or 0640.
As root, go to the ./starnet/configuration/ directory and perform the following command:
# chmod 0400 database.inc.php
Check if your file has the right permissions with the 'ls -l' command. Here are some examples:
-rw-rw-rw- 1 www www 416 2004-10-28 20:13 database.inc.php
This is VERY INSECURE! The content of the database.inc.php file is world readable. A cracker can find yor database password and do bad things.
-r-------- 1 www www 416 2004-10-28 20:13 database.inc.php
This is secure. The file where the username and password of the database are kept cannot be seen by the outside world. The permission 0400 indicates that the file is only readable by the user 'www'.
If SyndeoCMS does not function with this tight permission, set it to 0640 and try again.
As root, go the document root and perform the following commands:
# chmod -R 0755 ./starnet/*
# chmod -R 0755 index.php
# chmod -R 0755 print.php
This will give all SyndeoCMS files and directories the reasonalble thight permissions.
# chmod -R 0640 ./starnet/*
# chmod -R 0640 ./agenda/*
# chmod -R 0640 index.php
# chmod -R 0640 print.php
This sets all fiels and directories to 0644. This sets all fiels and directories to 0640. As you will understand SyndeoCMS will not work because the executable bit is missiing on the directories.
The followiing command only sets the directories to 0750 and leaves the files to 0640.
find -type d -print0 | xargs -0 chmod 750 ./starnet
And, last but not least, as a final check it's a good idea to run /starnet/syndeo_check.php. See SyndeoCMS check below.
3.2 PHP Mail function
On some servers the PHP mail function can be disabled. You can check this by running the syndeo_check script see: SyndeoCMS check below.
At the bottom of the page you find an email send option. You can send the email to yourself to check if sending emails works properly.
If you can send the output of the syndeo_check script via email, you can skip to step 4.
line 109: var $Mailer = "smtp";
line 142: var $Hostname = "syndeo.user";
line 156: var $Host = "mail.ourserver.org";
line 174: var $SMTPAuth = true;
line 180: var $Username = "john"; // SMTP username
line 186: var $Password = "secret"; // SMTP password
Change the values of $Host, $Username and $Password according to your site , you may have to contact your provider/server administrator.
4. Building your site; some advice
The best procedure for starting to build your site is:
When uploading material to the server, take care of the following naming conventions of the files:
When asking questions, please state:
Give a detailed description of all the steps you took before the problem occurred.
When we receive your problem, the first thing we do is try to recreate your problem. Only in this way we can try to fix it. No guarantees.
5. Migrate from Site@School 2.4.10
When you want to migrate from Site@School to SyndeoCMS, you need to have version S@S version 2.4.10.
If you have a lower version you will need to upgrade to 2.4.10 first
install_overview.png
Click on the 'migrate2.4_2.5.php and follow the instructions on the screen' file.
This migration script will upgrade your S@S system to SyndeoCMS version 2.5.10.
The migration is done in three steps. In the final step additional database tables are created or changed.
These simply are to click 'Continue' a couple of times.
And , last but not least, as a final check it's a good idea to run ../starnet/syndeo_check.php, see the SyndeoCMS check script.
5.1 Upgrading and your language files
When you have made changes to your language files, for example to adapt SyndeoCMS for a youth orchestra in stead of a primary school, you have to take measures to prevent your language files getting overwritten when you upgrade to a new version of SyndeoCMS. All your precious work will be lost!
6. Installing modules
At this moment (2.5) there are no additional modules to install.
It is possible that additional modules became available after a SyndeoCMS release.
These modules can be downloaded at our download section at
Sourceforge.
7. Installation problems
When problems arise during or after the installation, several helpers are available:
Installation chapter
Did you perform all the steps? When installing SyndeoCMS in another directory, did you set the correct directory/ies in the second entry field?
Did you give the right MySQL username and passwords, etc. etc.
Furthermore, the chapters of the manual contain detailed info on how to use SyndeoCMS. Many problems can be prevented by reading the manual.
When you have two browser windows open on one computer, i.e. your schoolsite and SyndeoCMS management, it can happen that the changes made are not visible on the site, even after reloading the page. This is due to PHP sessions used in SyndeoCMS.
Remedy:
Just logout of the SyndeoCMS management and press refresh in the other window and the changes will be visible.
Installation check script
The easiest check is the installation check script. The script is called 'syndeo_check.txt' and is located in the ../starnet directory. You have to rename the script to syndeo_check.php. The .txt extension prevents execution of the script. This is a safety precaution. Set the permissions of the script to 660.
Point your browser at http://www.yourschool.org/starnet/syndeo_check.php. The URL is fictional, replace it with the URL of your school. You should see someting like:
install_check1.png
install_check2.png
install_check3.png
At the bottom of the page you find an email send option. You can send the email to yourself to check if sending emails works properly.
PhpMyAdmin
A useful tool for reporting and/or solving problems is the graphical front end to the MySQL database. Its name is 'PhpMyAdmin', and you can find it on the PhpMyAdmin site
http://www.phpmyadmin.net/home_page/ site.
Download the program, unpack it in your document root, read the install file and enter necessary data in the config.php file. Now you can see your database and tables, and if necessary, delete or modify them.
Common problems
One of the things to look for is in your 'PHP.ini' file:
session.use_cookies = 0
It should be set to:
session.use_cookies = 1
You can check session support by renaming syndeo_check.txt to syndeo_check.php.
Point your browser to http://yourschool.org/starnet/syndeo_check.php (fictional URL, replace with your URL) and look for this entry:
'Check if server has session management.'
It has to produce: Check OK! and 'OK!'.
Reset the syndeo_check.php to syndeo_check.txt and its permissions to 000.
install_error1.png
In the first field should only be the document root, in the second should only be the path to the starnet directory without a leading slash.
Ask help
SyndeoCMS has a lot of possibilites so the chance to do something wrong are endless. We try to prevent errors, but sometimes overlook things. Please report bugs when you find them.
Furthermore, please save us time and read the fine manual.
When things are still not clear, visit our Forum.
Give a detailed description of all the steps you took before the problem occurred.
When we receive your request, the first thing we do is try to recreate your problem. Only in this way we can try to fix it.
Good luck with SyndeoCMS!
The SyndeoCMS Team.