Changes

From SME Server
Jump to navigationJump to search
5,554 bytes added ,  18:53, 31 January 2011
m
Created page with '{{Languages}} ===Maintainer=== Daniel B.<br/> [http://www.firewall-services.com Firewall Services]<br> mailto:daniel@firewall-services.com === Description ==…'
{{Languages}}


===Maintainer===
[[User:VIP-ire|Daniel B.]]<br/>
[http://www.firewall-services.com Firewall Services]<br>
mailto:daniel@firewall-services.com


=== Description ===

[http://openupload.sourceforge.net/ Open Upload] is a PHP application to create a private / public file download server similar to MegaUpload or RapidShare.

=== Requirement ===

This contrib has been developped and tested on SME Server 8b5 and later. It probably won't work on SME 7.

=== Installation ===

Configure Firewall-Services's repository:

db yum_repositories set fws repository \
BaseURL http://repo.firewall-services.com/centos/\$releasever \
EnableGroups no GPGCheck yes \
Name "Firewall Services" \
GPGKey http://repo.firewall-services.com/RPM-GPG-KEY \
Visible yes status disabled
signal-event yum-modify

*install the rpms

yum --enablerepo=fws install smeserver-openupload

* Appply the needed configuration:

db configuration setprop openupload Authentication ldap
signal-event webapps-update
db configuration set UnsavedChanges no

* Create a group (using the server-manager) called 'admins'. All the members of this group will have admin privileges in OpenUpload. Once you're logged in, you can change ACL if you want to use another group name for administrative tasks.

You can now access the application using this URL: https://your-server.domain.tld/openupload


=== Additional options ===

Some settings are available from the DB

* '''Authentication''': Control the way users are authenticated. Correct values are '''ldap''' (uses the local LDAP server as backend for users and groups), '''imap''' (uses your local IMAP server to validate credentials, and the internal database to store user and groups informations, users are created automatically on first login), '''internal''' (uses the internal database to manage users and groups. An admin have to create user account befor they can login). If you use the internal authentication mechanisme, you need to login using admin/admin. a last value is available for this prop: '''LemonLDAP''' which uses [[LemonLDAP-NG]] to validate credentials, and the internal ldap server do get user/group information. You can have more information on this later on this page.
* '''RequireSSL''': Should users accessing Open Upload should be redirected to a secured address ? Correct values are '''yes''' (always redirect to https://), '''no''': allow unsecured connections, or '''login''': only redirect to https when user try to login. This allow to protect passwords when users log into the application, but let downloads run over un-protected connections (might be usefull if you use a self-signed certificate)
* '''MaxUpload''': the maximum number of files sent in one run
* '''MaxUploadSize''': the maximum size allowed per file (in MegaBytes)
* '''AliasOnPrimary''': can be enabled or disabled (default is enabled). This prop lets you disable the access to Open Upload on your primary domain (the alias /openupload won't be added in apache configuration). This is usefull if you want the application to be available only with a virtualhost.


example:
db configuration setprop openupload RequireSSL login MaxUpload 10 MaxUploadSize 750
signal-event webapps-update

=== Intergration with LemonLDAP::NG ===
OpenUpload can be protected by LemonLDAP::NG. Here're the steps to protect it

==== Disable the access on the primary domain ====
You should disable the access to Open Upload on your primary domain:
db configuration setprop openupload AliasOnPrimary disabled
signal-event webapps-update

==== Enable LemonLDAP::NG integration ====
This contrib support LemonLDAP NG auth quite easily:
db configuration setprop openupload Authentication LemonLDAP
signal-event webapps-update

==== Create a new virtualhost for Open Upload ====
Lets create a new virtualhost for Open Upload. You can choose the name you want, for example, lets create upload.domain.tld:

db domains set upload.domain.tld domain Content Primary Description 'Open Upload' \
DocumentRoot /usr/share/openupload/www/ Nameservers internet TemplatePath WebAppVirtualHost \
LemonLDAP enabled
signal-event domain-create upload.domain.tld
signal-event webapps-update

==== Declare this virtualhost in LemonLDAP ====
You can now create the virtualhost in LemonLDAP management interface. You can create the rules you want. For example, here're the rules you can use to let everyone (unauthenticated users) download files, and let LemonLDAP::NG validate credentials of users trying to login:

* Comment: 01deny_double_action
* Expression: (a|action)=.*(a|action)=.*
* Rule: deny


* 10unprotect_dl
* Expression: (a|action)=[dgr]
* Rule: unprotect


* 12unprotect_templates
* Expression: ^/templates/
* Rule: unprotect


* 13unprotect_captcha
* Expression: ^/plugins/captcha\.php
* Rule: unprotect


* 14unprotect_index
* Expression: ^/index.php$
* Rule: unprotect


* 20logout
* Expression: (a|action)=logout
* Rule: logout_app


* 21login
* Expression: (a|action)=login
* Rule: logout_app https://upload.domain.tld/


=== Backup and Restore ===
You should backup the directory /var/lib/openupload, which is used to store uploaded files.

=== Uninstall ===
If you want to remove the contrib, just run:
yum remove openupload

You can manually remove file in /var/lib/openupload and /usr/share/openupload if you want to remove all files used by Open Upload

=== Source ===
The source for this contrib can be found in Firewall-Services's repository [http://repo.firewall-services.com/centos/5/SRPMS/].

----
[[Category:Contrib]]

Navigation menu