Installation - Linux Source

History Key

  • New content
  • Removed content

Recent Versions

Choose two versions to compare, or click the link to view it.

  1. 102. 2 months by meijer
  2. 101. 2 months by meijer
  3. 100. 7 months by xjansen
  4. 99. 7 months by xjansen
  5. 98. 8 months by meijer
  6. 97. 9 months by wendy_mason
  7. 96. 9 months by xjansen
  8. 95. 11 months by xjansen
  9. 94. 11 months by xjansen
  10. 93. 11 months by xjansen
  11. 92. 11 months by xjansen
  12. 91. 11 months by xjansen
  13. 90. about 1 year by xjansen
  14. 89. over 1 year by xjansen
  15. 88. over 1 year by xjansen
  16. 87. over 1 year by xjansen
  17. 86. over 1 year by xjansen
  18. 85. over 1 year by xjansen
  19. 84. over 1 year by xjansen
  20. 83. over 1 year by meijer
  21. 82. over 1 year by meijer
  22. 81. over 1 year by meijer
  23. 80. over 1 year by xjansen
  24. 79. over 1 year by xjansen
  25. 78. over 1 year by xjansen
  26. 77. over 1 year by xjansen
  27. 76. over 1 year by xjansen
  28. 75. over 1 year by xjansen
  29. 74. over 1 year by xjansen
  30. 73. over 1 year by xjansen
  31. 72. over 1 year by xjansen
  32. 71. over 1 year by xjansen
  33. 70. over 1 year by xjansen
  34. 69. over 1 year by xjansen
  35. 68. over 1 year by xjansen
  36. 67. over 1 year by xjansen
  37. 66. over 1 year by xjansen
  38. 65. over 1 year by xjansen
  39. 64. over 1 year by xjansen
  40. 63. over 1 year by xjansen
  41. 62. over 1 year by xjansen
  42. 61. over 1 year by ricoshae
  43. 60. over 1 year by ricoshae
  44. 59. over 1 year by ricoshae
  45. 58. over 1 year by meijer
  46. 57. over 1 year by ricoshae
  47. 56. over 1 year by wendy_mason
  48. 55. over 1 year by wendy_mason
  49. 54. over 1 year by ricoshae
  50. 53. over 1 year by ricoshae
  51. 52. almost 2 years by ricoshae
  52. 51. almost 2 years by wendy_mason
  53. 50. almost 2 years by xjansen
  54. 49. about 2 years by ricoshae
  55. 48. about 2 years by meijer
  56. 47. about 2 years by meijer
  57. 46. about 2 years by meijer
  58. 45. about 2 years by meijer
  59. 44. about 2 years by meijer
  60. 43. about 2 years by meijer
  61. 42. about 2 years by meijer
  62. 41. about 2 years by meijer
  63. 40. about 2 years by meijer
  64. 39. about 2 years by meijer
  65. 38. about 2 years by meijer
  66. 37. about 2 years by meijer
  67. 36. about 2 years by meijer
  68. 35. about 2 years by meijer
  69. 34. about 2 years by meijer
  70. 33. about 2 years by meijer
  71. 32. about 2 years by meijer
  72. 31. about 2 years by meijer
  73. 30. about 2 years by meijer
  74. 29. about 2 years by meijer
  75. 28. about 2 years by meijer
  76. 27. over 2 years by meijer
  77. 26. over 2 years by ricoshae
  78. 25. over 2 years by ricoshae
  79. 24. over 2 years by guido_aben
  80. 23. over 2 years by guido_aben
  81. 22. over 2 years by ricoshae
  82. 21. over 2 years by ricoshae
  83. 20. over 2 years by ricoshae
  84. 19. over 2 years by ricoshae
  85. 18. over 2 years by ricoshae
  86. 17. over 2 years by ricoshae
  87. 16. over 2 years by ricoshae
  88. 15. over 2 years by ricoshae
  89. 14. over 2 years by ricoshae
  90. 13. over 2 years by ricoshae
  91. 12. over 2 years by ricoshae
  92. 11. over 2 years by ricoshae
  93. 10. over 2 years by ricoshae
  94. 9. over 2 years by ricoshae
  95. 8. over 2 years by meijer
  96. 7. over 2 years by meijer
  97. 6. over 2 years by ricoshae
  98. 5. over 2 years by ricoshae
  99. 4. over 2 years by ricoshae
  100. 3. over 2 years by ricoshae
  101. 2. over 2 years by ricoshae
  102. 1. over 2 years by ricoshae
 

 

 

This is the installation documentation for installing FileSender 1.1(.x) on Linux. This guide is written for installation from source on the Debian Linux platform but any Linux variant should work with some modifications (most notably about installing the required additional software packages).

Debian and RPM packages are also available to automate most of the steps below. Please see Installation - Debian Ubuntu and Installation - RPM for instructions on how to get and use them. The Debian and RPM packages will install the filesender and simplesamlphp software in the /usr/share/ directory tree. In the examples below /var/www is used as base directory. Please adapt the examples below where appropriate when using the packages.

 

Client and Server Requirements

See Requirements.

Install Apache2

Install Apache2 from the Debian package repository:

$ apt-get install apache2

Configure Apache2 with SSL

FileSender assumes it will run on a webserver with SSL enabled, which is enforced by the ForceSSL setting in the FileSender configuration file, check Configure your FileSender installation).  Get a certificate and configure your webserver with SSL.  Please note that a self-signed certificate will most likely cause upload problems with Flash (most notably the "#2038 IO Error" but others have been seen).  This is a Flash problem which is explained in more detail in the FAQ.

Disabling SSL means all file uploads and downloads are unprotected and any data transferred to and from your FileSender installation can be stolen.  Disabling SSL is not advisable.

Install and configure PHP5

  • Install PHP5 from the Debian package repository:

$ apt-get install php5 php5-cgi

  • Check whether the GMP extension is enabled (it usually is):

$cat /etc/php5/conf.d/gmp.ini
# configuration for php GMP module
extension=gmp.so

  • Change some PHP ini-settings to allow for larger files, longer execution times and to turn on logging. As of version 1.0.1 a sample settings file is provided in the the FileSender config directory as filesender-php.ini. This file can be stored in your /etc/php.d/ or /etc/php5/conf.d/ directory to activate those settings.  Please adapt the sample settings file where needed. Alternatively you can manually edit your php.ini file:

$ gedit /etc/php5/apache2/php.ini

To allow for larger files and longer execution times you will need to edit these lines:

max_input_time(in seconds)
upload_max_filesize(in M)
post_max_size (in M)

NOTE: Remember to change filesender $config['max_flash_upload_size'] to match your upload_max_filesize.If they are not the same FileSender will use the lowest value as the actual maximum upload size for Flash uploads.

Reasonable values are:

max_input_time = 3600
upload_max_filesize = 2047M
post_max_size = 2146445312 ; 2047M + 10K
 

To change the temporary location for Flash uploads configure this in php.ini:

upload_tmp_dir = /your/temporarylocation

Note: that this setting is for all PHP-apps, not only for filesender.

Note: It is best to make this temporary folder location the same as your filesender $config['site_temp_filestore'].

To turn on logging configure these lines in php.ini:

log_errors = on
error_log = syslog


  • When using Suhosin, changemake some settings:
Ifsure your PHP/etc/php5/apache2/conf.d/suhosin.ini installationcontains usesthe Suhosinfollowing:
; (checkconfiguration /etc/php5/apache2/conf.d/suhosin.ini) for php suhosin module
  • extension=suhosin.so
     
    [suhosin] 
    ; For Suhosin plugin versions before 0.9.33
    suhosin.cookie.encrypt = off
    ; Needed for IE compatibility
    suhosin.session.cryptua = off
    ; Needed for SimpleSAMLphp
    suhosin.get.max_value_length = 2048
     

Install and configure PostgreSQL

PostgreSQL can be installed from your standard debian repository along with PostgreSQL support in PHP:

$ apt-get install postgresql php5-pgsql

FileSender uses password based database logins and by default assumes that PostgreSQL is configured to accept password based sessions on 'localhost'. You should check and when needed change the relevant settings in the PostgreSQL pg_hba.conf configuration file. This file should have the following entries with md5 listed as METHOD for local IPv4 and IPv6 connections:

# Database administrative login by UNIX sockets
local   all         postgres                          ident
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
# "local" is for Unix domain socket connections only
local   all         all                               ident
# IPv4 local connections:
host    all         all         127.0.0.1/32          md5
# IPv6 local connections:
host    all         all         ::1/128               md5

On Debian based systems this file will be in /etc/postgresql/<version>/main/pg_hba.conf . On Red Hat/Fedora based systems this file will be in /var/lib/pgsql/data/pg_hba.conf . When changing the pg_hba.conf file you'll have to restart the database server with (version number may be different or not needed depending on your system):

$ /etc/init.d/postgresql-8.3 restart

Install SimpleSAMLphp

To set up a working SimpleSAMLphp that uses the preconfigured !OpenIdP as an authentication mechanism follow this recipe:

  1. Download SimpleSAMLphp 1.8.1 (note that recent Debian/Ubuntu have packages available, also the FileSender RPM and Debian repositories have SimpleSAMLphp packages).
  2. Some SimpleSAMLphp setups require the PHP mcrypt extension: apt-get install php-mcrypt
  3. Extract it into a suitable directory on your website such as /var/www/simplesamlphp-1.8.1
  4. Add "Alias /simplesaml /var/www/simplesamlphp-1.8.1/www" to your Apache virtual host configuration
  5. Copy the standard configuration files to the right places:

$ cp -r config-templates/*.php config/
$ cp -r metadata-templates/*.php metadata/

To tailor your SimpleSAMLphp installation to your local site please check its installation and configuration documentation.

When connecting to an Identity provider make sure all the required attributes are sent by the identity provider. See the section on IdP attributes in the Reference Manual for details.

By default the following attributes are set as required:

mail
eduPersonTargetedID
cn

By default FileSender uses eduPersonTargetedID for the unique identification of the user (this can be changed in the configuration). If your identity provider doesn't provide the eduPersonTargetedID attribute you can either change the attrabute uniquely identyfing a user or alternatively you can add an authproc filter to the metadata of that Identity provider to locally generate an eduPersonTargetedID attribute . See http://simplesamlphp.org/docs/1.8/core:authproc_targetedid for the details.

Install the FileSender package

  • Download the FileSender software from the FileSender 1.1 download page.
  • Extract the FileSender tarbal
tar zxvf /usr/local/src/filesender-1.1.tar.gz

This will create a directory 'filesender-1.1' . You can move that directory to the preferred location on your system. In this document we'll use /var/www/filesender :

mv filesender-1.1 /var/www/filesender
  • Make the files, tmp and log directories writable by the web daemon user and allow the web deamon user to read the config.php configuration file:
cd /var/www/filesender
chown www-data:www-data tmp files log
chgrp www-data config/config.php

The directory structure and permissions should now be as follows, carefully check the entries marked in bold:

filesender:/var/www/filesender# ls -l config/
total 24
-rw-r----- 1 root www-data 15347 2011-01-27 18:54 config.php

filesender:/var/www/filesender# ls -al
total 100
drwxr-xr-x 11 root     root      4096 2011-01-29 18:39 .
drwxr-xr-x  9 root   root     4096 2011-01-29 18:56 ..
-rw-r--r--  1 root     root     10783 2011-01-29 12:37 CHANGELOG.txt
drwxr-xr-x  2 root     root      4096 2011-01-29 18:39 classes
drwxr-xr-x  2 root     root      4096 2011-01-29 18:39 config
drwxr-xr-x  2 root     root      4096 2011-01-29 18:39 cron
drwxr-xr-x  2 www-data www-data  4096 2011-01-29 18:39 files
drwxr-xr-x  2 root     root      4096 2011-01-29 18:39 includes
-rw-r--r--  1 root     root      3318 2011-01-29 12:28 INSTALL.txt
-rw-r--r--  1 root     root      1554 2011-01-14 11:33 LICENCE.txt
drwxr-xr-x  2 www-data www-data  4096 2011-01-29 18:39 log
-rw-r--r--  1 root     root      2002 2011-01-29 12:28 README.txt
drwxr-xr-x  2 root     root      4096 2011-01-29 18:39 scripts
drwxr-xr-x  2 www-data www-data  4096 2011-01-29 18:39 tmp
drwxr-xr-x  6 root     root      4096 2011-01-29 18:39 www
  • Add an alias to your Apache virtual host configuration:

<VirtualHost *>

...

Alias /filesender /var/www/filesender/www

...

</VirtualHost>

this will make the FileSender web tree accessible through your web site.  Alternatively you can simply point your DocumentRoot to /var/www/filesender/www

 

Create the FileSender user and database

Run the following commands in a terminal to create the PostgreSQL user and  database to be used by FileSender.

Create the database user filesender without special privileges and with a password. The command will prompt you to specify and confirm a password for the new user. This is the password you need to configure in the FileSender configuration file.

$ sudo -u postgres createuser -S -D -R -P filesender
Enter password for new role: <secret>
Enter it again: <secret>

Create the filesender database with UTF8 encoding owned by the newly created filesender user:

$ sudo -u postgres createdb -E UTF8 -O filesender filesender
$ psql -h localhost filesender filesender < /var/www/filesender/scripts/filesender_db.sql
Password for user filesender: <secret>
NOTICE:  CREATE TABLE will create implicit sequence "files_fileid_seq" for serial column "files.fileid"
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "files_pkey" for table "files"
CREATE TABLE
CREATE SEQUENCE
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "logs_pkey" for table "logs"
CREATE TABLE

 

Configure your FileSender installation

To configure your FileSender installation, edit

/var/www/filesender/config/config.php

Carefully check and adapt the following settings. The minimum required changes to config.php are marked in bold:

$config['admin'] = '';
$config['adminEmail'] = 'Your.Address@example.org';
$config['Default_TimeZone'] = 'Europe/Berlin';

$config['site_url'] = $prot . $_SERVER['SERVER_NAME'] . '/filesender/'; // URL to Filesender
$config['site_simplesamlurl'] =  $prot . $_SERVER['SERVER_NAME'] . '/simplesaml/';

$config['site_filestore'] = '/var/www/filesender/files/';
$config['site_temp_filestore'] = '/var/www/filesender/tmp/';
$config['site_simplesamllocation'] = '/var/www/simplesamlphp-1.8.1/';
$config['log_location'] = '/var/www/filesender/log/';

$config['site_name'] = 'FileSender';

$config['forceSSL'] = true;

$config['pg_host'] = 'localhost'; // postgres database host
$config['pg_database'] = 'filesender'; // name of database on postgres
$config['pg_port'] = '5432'; // default port
$config['pg_username'] = 'filesender'; // username to connect to postgress database
$config['pg_password'] = '<secret>'; // password to connect to postgress database

Detailed information about the configuration settings of FileSender can be found in the Administrator reference manual

Configure Cron

Cron jobs are scheduled by setting up a "crontab." A crontab is a text file that contains the commands to be run.
Filesender uses a Cron job to remove files that have expired and close any vouchers that have expired.
Typically you would run the Cron job every night at a set time. Note that the Debian and RPM packages will install the required cronjob for you.

To edit a crontab through the command line, type:

crontab -e

Add the following line:

0 0 * * * php -q /var/www/filesender/cron/cron.php

This will run your cron page nightly at midnight.

Start using FileSender

https://yoursite/filesender/

Support and Feedback

See Support and Mailinglists and Feature requests.