The Galaxy instance we have running at the University of Cape Town operates on the Novell SLES 11 platform. The SMT repositories do not have ProFTPD, which is the recommended FTP service for Galaxy. Also, there is a lack of documentation to configure the FTP service for MySQL on the Galaxy documentation site. I eventually got it working and plan to highlight the missing documentation.
Problem: Galaxy users cannot upload large files via the web browser.
Proposed Solution: Enable the FTP service in Galaxy and have the users upload their files via FTP. The files can then be viewed in the web-based portal. The FTP service will authenticate against the MySQL table "galaxy_user". Each user will have their own FTP directory.
Technical Implementation: Firstly, we need to add the repository for ProFTPD and set the repository priority to a value higher than the default, 99. We will set it to 120. Add the following repository with either zypper or yast -http://download.opensuse.org/repositories/server:/ftp/SLE_11_SP1/x86_64/
Installation and Configuration Guidelines:
1. Install ProFTPD
2. Create a modules configuration file to load modules for ProFTPD
3. Create a mysql configuration file to contain the SQL lookup and database credentials
4. Update ProFTPD configuration.
5. Enable FTP within Galaxy Web Portal
1. Install ProFTPD:
This is a rather simple and efficient process.
“zypper install proftpd proftpd-mysql”
2. Module configuration file:
Create a new document file in /etc/proftpd/conf.d/modules.conf.
Add the following text to the modules.conf file:
LoadModule mod_sql.c
LoadModule mod_sql_mysql.c
LoadModule mod_sql_passwd.c
3. MySQL configuration file:
Before we create the configuration file we need to create a user within the MySQL which will read the galaxy user table. Granting “Select” on the table is enough to get going. Its best to create a different user id for access to the galaxy_user table as opposed to the Galaxy DB user which has all permissions on the database. The command is as follows:
grant select on galaxy.galaxy_user to dbuser@localhost identified by 'dbpasswd';
Go ahead and create the mysql.conf file and add the following to it.
<Global>
SQLEngine on
SQLConnectInfo galaxy@localhost dbuser dbpasswd
SQLAuthTypes SHA1
SQLAuthenticate users
SQLBackend mysql
SQLPasswordEncoding hex
SQLPasswordEngine on
SQLDefaultHomedir /tmp
SQLLogFile /var/log/proftpd/SQL.log
# Define a custom query for lookup that returns a passwd-like entry. UID and GID should match your Galaxy user.
SQLUserInfo custom:/LookupGalaxyUser
SQLNamedQuery LookupGalaxyUser SELECT "email,password,'512','512','/opt/galaxy-datasets/database/files/%U','/bin/bash' FROM galaxy_user WHERE email='%U'"
</Global>
4. Update ProFTPD Configuration: /etc/proftpd/proftpd.conf
AuthOrder mod_sql.c
Include /etc/proftpd/conf.d/*.conf
ServerName "ProFTPD on hostname"
ServerType standalone
DefaultServer on
AllowOverwrite on
AllowStoreRestart on
These options above may or may not be enabled so ensure they are.
5. Enable the FTP service in Galaxy Portal:
Edit the galaxy-dist/universe_wsgi.ini and make the following adjustments
# This should point to a directory containing subdirectories matching users'
# email addresses, where Galaxy will look for files.
ftp_upload_dir = galaxy-dist/database/files/
# This should be the hostname of your FTP server, which will be provided to
# users in the help text.
ftp_upload_site = ftp_server_name
Restart services:
- Restart Galaxy and ProFTPD