commit a0cad29cd209bf038a3f0c7d55c1676fa45374b6 Author: Julien Malik Date: Thu Sep 25 00:20:59 2014 +0200 initial commit diff --git a/conf/bootstrap.json b/conf/bootstrap.json new file mode 100644 index 0000000..d7c90ad --- /dev/null +++ b/conf/bootstrap.json @@ -0,0 +1,73 @@ +{ + "core.conf":{ + "UNIQUE_INSTANCE_CONFIG":{ + "instance_name":"conf.sql", + "group_switch_value":"conf.sql", + "SQL_DRIVER":{ + "core_driver":"core", + "group_switch_value":"core" + } + }, + "DIBI_PRECONFIGURATION":{ + "mysql_username":"pydio", + "mysql_password":"YNH_MYSQL_PWD", + "mysql_host":"localhost", + "mysql_driver":"mysql", + "mysql_database":"pydio", + "group_switch_value":"mysql" + } + }, + "core.auth":{ + "ENABLE_USERS":true, + "CASE_SENSITIVE":false, + "ALLOW_GUEST_BROWSING":false, + "PASSWORD_MINLENGTH":"8", + "SESSION_SET_CREDENTIALS":false, + "SECURE_LOGIN_FORM":false, + "ENABLE_FORGOT_PASSWORD":false, + "FORGOT_PASSWORD_ACTION":"reset-password-ask", + "MASTER_INSTANCE_CONFIG":{ + "instance_name":"auth.ldap", + "TRANSMIT_CLEAR_PASS":true, + "TEST_USER":"", + "MAPPING_LOCAL_TYPE_replication":"replicable_MAPPING", + "MAPPING_LOCAL_TYPE":"", + "MAPPING_LOCAL_PARAM_replication":"replicable_MAPPING", + "MAPPING_LOCAL_PARAM":"", + "MAPPING_LDAP_PARAM_replication":"replicable_MAPPING", + "MAPPING_LDAP_PARAM":"", + "LOGIN_REDIRECT":"", + "LDAP_USERATTR":"uid", + "LDAP_USER":"", + "LDAP_URL":"localhost", + "LDAP_SEARCHUSER_ATTR":"", + "LDAP_PROTOCOL":"ldap", + "LDAP_PORT":"389", + "LDAP_PASSWORD":"", + "LDAP_GROUP_FILTER":"objectClass=group", + "LDAP_GROUPATTR":"", + "LDAP_GDN_replication":"replicable_LDAPGDN", + "LDAP_GDN":"", + "LDAP_FILTER":"objectClass=mailAccount", + "LDAP_DN_replication":"replicable_LDAPDN", + "LDAP_DN":"ou=users,dc=yunohost,dc=org", + "AUTO_APPLY_ROLE":"", + "AUTOCREATE_AJXPUSER":true, + "AJXP_ADMIN_LOGIN":"test", + "group_switch_value":"auth.ldap" + }, + "MULTI_MODE":{ + "instance_name":"MASTER_SLAVE", + "CACHE_MASTER_USERS_TO_SLAVE":true, + "group_switch_value":"MASTER_SLAVE" + }, + "MULTI_USER_BASE_DRIVER":"", + "SLAVE_INSTANCE_CONFIG":[ + + ], + "SLAVE_INSTANCE_CONFIG_group_switch":"" + }, + "auth.remote":{ + "AJXP_PLUGIN_ENABLED":false + } +} \ No newline at end of file diff --git a/conf/create.mysql b/conf/create.mysql new file mode 100644 index 0000000..eb5dddf --- /dev/null +++ b/conf/create.mysql @@ -0,0 +1,381 @@ +-- MySQL dump 10.13 Distrib 5.5.35, for debian-linux-gnu (x86_64) +-- +-- Host: localhost Database: pydio +-- ------------------------------------------------------ +-- Server version 5.5.35-0ubuntu0.12.04.2 + +use pydio; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `ajxp_feed` +-- + +DROP TABLE IF EXISTS `ajxp_feed`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_feed` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `edate` int(11) NOT NULL, + `etype` varchar(12) NOT NULL, + `htype` varchar(32) NOT NULL, + `index_path` mediumtext, + `user_id` varchar(255) NOT NULL, + `repository_id` varchar(33) NOT NULL, + `user_group` varchar(500) DEFAULT NULL, + `repository_scope` varchar(50) DEFAULT NULL, + `repository_owner` varchar(255) DEFAULT NULL, + `content` longblob NOT NULL, + PRIMARY KEY (`id`), + KEY `edate` (`edate`,`etype`,`htype`,`user_id`,`repository_id`), + KEY `index_path` (`index_path`(40)) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_feed` +-- + +LOCK TABLES `ajxp_feed` WRITE; +/*!40000 ALTER TABLE `ajxp_feed` DISABLE KEYS */; +/*!40000 ALTER TABLE `ajxp_feed` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_groups` +-- + +DROP TABLE IF EXISTS `ajxp_groups`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_groups` ( + `groupPath` varchar(255) NOT NULL, + `groupLabel` varchar(255) NOT NULL, + PRIMARY KEY (`groupPath`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_groups` +-- + +LOCK TABLES `ajxp_groups` WRITE; +/*!40000 ALTER TABLE `ajxp_groups` DISABLE KEYS */; +/*!40000 ALTER TABLE `ajxp_groups` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_log` +-- + +DROP TABLE IF EXISTS `ajxp_log`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `logdate` datetime DEFAULT NULL, + `remote_ip` varchar(45) DEFAULT NULL, + `severity` enum('DEBUG','INFO','NOTICE','WARNING','ERROR') DEFAULT NULL, + `user` varchar(255) DEFAULT NULL, + `message` text, + `params` text, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_log` +-- + +LOCK TABLES `ajxp_log` WRITE; +/*!40000 ALTER TABLE `ajxp_log` DISABLE KEYS */; +INSERT INTO `ajxp_log` VALUES (1,'2014-03-24 18:07:50','127.0.0.1','INFO','admin','AuthService','Log In '); +/*!40000 ALTER TABLE `ajxp_log` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_plugin_configs` +-- + +DROP TABLE IF EXISTS `ajxp_plugin_configs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_plugin_configs` ( + `id` varchar(50) NOT NULL, + `configs` longblob NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_plugin_configs` +-- + +LOCK TABLES `ajxp_plugin_configs` WRITE; +/*!40000 ALTER TABLE `ajxp_plugin_configs` DISABLE KEYS */; +INSERT INTO `ajxp_plugin_configs` VALUES ('core.ajaxplorer','a:2:{s:17:\"APPLICATION_TITLE\";s:5:\"Pydio\";s:16:\"DEFAULT_LANGUAGE\";s:2:\"en\";}'),('core.log','a:1:{s:22:\"UNIQUE_PLUGIN_INSTANCE\";a:3:{s:13:\"instance_name\";s:7:\"log.sql\";s:18:\"group_switch_value\";s:7:\"log.sql\";s:10:\"SQL_DRIVER\";a:2:{s:11:\"core_driver\";s:4:\"core\";s:18:\"group_switch_value\";s:4:\"core\";}}}'),('core.mq','a:1:{s:18:\"UNIQUE_MS_INSTANCE\";a:3:{s:13:\"instance_name\";s:6:\"mq.sql\";s:18:\"group_switch_value\";s:6:\"mq.sql\";s:10:\"SQL_DRIVER\";a:2:{s:11:\"core_driver\";s:4:\"core\";s:18:\"group_switch_value\";s:4:\"core\";}}}'),('core.notifications','a:2:{s:11:\"USER_EVENTS\";b:1;s:20:\"UNIQUE_FEED_INSTANCE\";a:3:{s:13:\"instance_name\";s:8:\"feed.sql\";s:18:\"group_switch_value\";s:8:\"feed.sql\";s:10:\"SQL_DRIVER\";a:2:{s:11:\"core_driver\";s:4:\"core\";s:18:\"group_switch_value\";s:4:\"core\";}}}'),('gui.ajax','a:1:{s:22:\"CUSTOM_WELCOME_MESSAGE\";s:16:\"Welcome to Pydio\";}'); +/*!40000 ALTER TABLE `ajxp_plugin_configs` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_repo` +-- + +DROP TABLE IF EXISTS `ajxp_repo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_repo` ( + `uuid` varchar(33) NOT NULL, + `parent_uuid` varchar(33) DEFAULT NULL, + `owner_user_id` varchar(50) DEFAULT NULL, + `child_user_id` varchar(50) DEFAULT NULL, + `path` varchar(255) DEFAULT NULL, + `display` varchar(255) DEFAULT NULL, + `accessType` varchar(20) DEFAULT NULL, + `recycle` varchar(255) DEFAULT NULL, + `bcreate` tinyint(1) DEFAULT NULL, + `writeable` tinyint(1) DEFAULT NULL, + `enabled` tinyint(1) DEFAULT NULL, + `isTemplate` tinyint(1) DEFAULT NULL, + `inferOptionsFromParent` tinyint(1) DEFAULT NULL, + `slug` varchar(255) DEFAULT NULL, + `groupPath` varchar(255) DEFAULT NULL, + PRIMARY KEY (`uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_repo` +-- + +LOCK TABLES `ajxp_repo` WRITE; +/*!40000 ALTER TABLE `ajxp_repo` DISABLE KEYS */; +/*!40000 ALTER TABLE `ajxp_repo` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_repo_options` +-- + +DROP TABLE IF EXISTS `ajxp_repo_options`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_repo_options` ( + `oid` int(11) NOT NULL AUTO_INCREMENT, + `uuid` varchar(33) NOT NULL, + `name` varchar(50) NOT NULL, + `val` blob, + PRIMARY KEY (`oid`), + KEY `uuid` (`uuid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_repo_options` +-- + +LOCK TABLES `ajxp_repo_options` WRITE; +/*!40000 ALTER TABLE `ajxp_repo_options` DISABLE KEYS */; +/*!40000 ALTER TABLE `ajxp_repo_options` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_roles` +-- + +DROP TABLE IF EXISTS `ajxp_roles`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_roles` ( + `role_id` varchar(255) NOT NULL, + `serial_role` text NOT NULL, + PRIMARY KEY (`role_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_roles` +-- + +LOCK TABLES `ajxp_roles` WRITE; +/*!40000 ALTER TABLE `ajxp_roles` DISABLE KEYS */; +INSERT INTO `ajxp_roles` VALUES ('AJXP_USR_/admin','O:9:\"AJXP_Role\":7:{s:12:\"\0*\0groupPath\";N;s:9:\"\0*\0roleId\";s:15:\"AJXP_USR_/admin\";s:12:\"\0*\0roleLabel\";N;s:7:\"\0*\0acls\";a:5:{i:1;s:2:\"rw\";s:9:\"ajxp_user\";s:2:\"rw\";i:0;s:2:\"rw\";s:9:\"ajxp_conf\";s:2:\"rw\";s:11:\"fs_template\";s:2:\"rw\";}s:13:\"\0*\0parameters\";a:1:{s:19:\"AJXP_REPO_SCOPE_ALL\";a:1:{s:9:\"core.conf\";a:1:{s:17:\"USER_DISPLAY_NAME\";s:5:\"admin\";}}}s:10:\"\0*\0actions\";a:0:{}s:14:\"\0*\0autoApplies\";a:0:{}}'),('GUEST','O:9:\"AJXP_Role\":7:{s:12:\"\0*\0groupPath\";N;s:9:\"\0*\0roleId\";s:5:\"GUEST\";s:12:\"\0*\0roleLabel\";s:15:\"Guest user role\";s:7:\"\0*\0acls\";a:0:{}s:13:\"\0*\0parameters\";a:0:{}s:10:\"\0*\0actions\";a:1:{s:19:\"AJXP_REPO_SCOPE_ALL\";a:3:{s:9:\"access.fs\";a:1:{s:5:\"purge\";s:8:\"disabled\";}s:10:\"meta.watch\";a:1:{s:12:\"toggle_watch\";s:8:\"disabled\";}s:12:\"index.lucene\";a:1:{s:5:\"index\";s:8:\"disabled\";}}}s:14:\"\0*\0autoApplies\";a:1:{i:0;s:5:\"guest\";}}'),('MINISITE','O:9:\"AJXP_Role\":7:{s:12:\"\0*\0groupPath\";N;s:9:\"\0*\0roleId\";s:8:\"MINISITE\";s:12:\"\0*\0roleLabel\";s:14:\"Minisite Users\";s:7:\"\0*\0acls\";a:0:{}s:13:\"\0*\0parameters\";a:0:{}s:10:\"\0*\0actions\";a:1:{s:22:\"AJXP_REPO_SCOPE_SHARED\";a:9:{s:9:\"access.fs\";a:3:{s:9:\"ajxp_link\";b:0;s:5:\"chmod\";b:0;s:5:\"purge\";b:0;}s:10:\"meta.watch\";a:1:{s:12:\"toggle_watch\";b:0;}s:11:\"conf.serial\";a:1:{s:13:\"get_bookmarks\";b:0;}s:8:\"conf.sql\";a:1:{s:13:\"get_bookmarks\";b:0;}s:12:\"index.lucene\";a:1:{s:5:\"index\";b:0;}s:12:\"action.share\";a:1:{s:5:\"share\";b:0;}s:8:\"gui.ajax\";a:1:{s:8:\"bookmark\";b:0;}s:11:\"auth.serial\";a:1:{s:11:\"pass_change\";b:0;}s:8:\"auth.sql\";a:1:{s:11:\"pass_change\";b:0;}}}s:14:\"\0*\0autoApplies\";a:0:{}}'),('MINISITE_NODOWNLOAD','O:9:\"AJXP_Role\":7:{s:12:\"\0*\0groupPath\";N;s:9:\"\0*\0roleId\";s:19:\"MINISITE_NODOWNLOAD\";s:12:\"\0*\0roleLabel\";s:28:\"Minisite Users - No Download\";s:7:\"\0*\0acls\";a:0:{}s:13:\"\0*\0parameters\";a:0:{}s:10:\"\0*\0actions\";a:1:{s:22:\"AJXP_REPO_SCOPE_SHARED\";a:1:{s:9:\"access.fs\";a:4:{s:8:\"download\";b:0;s:14:\"download_chunk\";b:0;s:16:\"prepare_chunk_dl\";b:0;s:12:\"download_all\";b:0;}}}s:14:\"\0*\0autoApplies\";a:0:{}}'),('ROOT_ROLE','O:9:\"AJXP_Role\":7:{s:12:\"\0*\0groupPath\";N;s:9:\"\0*\0roleId\";s:9:\"ROOT_ROLE\";s:12:\"\0*\0roleLabel\";s:9:\"Root Role\";s:7:\"\0*\0acls\";a:2:{i:1;s:2:\"rw\";s:9:\"ajxp_user\";s:2:\"rw\";}s:13:\"\0*\0parameters\";a:1:{s:19:\"AJXP_REPO_SCOPE_ALL\";a:1:{s:9:\"core.conf\";a:2:{s:18:\"DEFAULT_REPOSITORY\";s:9:\"ajxp_user\";s:24:\"DEFAULT_START_REPOSITORY\";s:9:\"ajxp_user\";}}}s:10:\"\0*\0actions\";a:0:{}s:14:\"\0*\0autoApplies\";a:2:{i:0;s:8:\"standard\";i:1;s:5:\"admin\";}}'); +/*!40000 ALTER TABLE `ajxp_roles` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_simple_store` +-- + +DROP TABLE IF EXISTS `ajxp_simple_store`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_simple_store` ( + `object_id` varchar(255) NOT NULL, + `store_id` varchar(50) NOT NULL, + `serialized_data` longtext, + `binary_data` longblob, + `related_object_id` varchar(255) DEFAULT NULL, + `insertion_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`object_id`,`store_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_simple_store` +-- + +LOCK TABLES `ajxp_simple_store` WRITE; +/*!40000 ALTER TABLE `ajxp_simple_store` DISABLE KEYS */; +/*!40000 ALTER TABLE `ajxp_simple_store` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_user_bookmarks` +-- + +DROP TABLE IF EXISTS `ajxp_user_bookmarks`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_user_bookmarks` ( + `rid` int(11) NOT NULL AUTO_INCREMENT, + `login` varchar(255) NOT NULL, + `repo_uuid` varchar(33) NOT NULL, + `path` varchar(255) DEFAULT NULL, + `title` varchar(255) DEFAULT NULL, + PRIMARY KEY (`rid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_user_bookmarks` +-- + +LOCK TABLES `ajxp_user_bookmarks` WRITE; +/*!40000 ALTER TABLE `ajxp_user_bookmarks` DISABLE KEYS */; +/*!40000 ALTER TABLE `ajxp_user_bookmarks` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_user_prefs` +-- + +DROP TABLE IF EXISTS `ajxp_user_prefs`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_user_prefs` ( + `rid` int(11) NOT NULL AUTO_INCREMENT, + `login` varchar(255) NOT NULL, + `name` varchar(255) NOT NULL, + `val` blob, + PRIMARY KEY (`rid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_user_prefs` +-- + +LOCK TABLES `ajxp_user_prefs` WRITE; +/*!40000 ALTER TABLE `ajxp_user_prefs` DISABLE KEYS */; +INSERT INTO `ajxp_user_prefs` VALUES (1,'admin','AJXP_WEBDAV_DATA','$phpserial$a:1:{s:3:\"HA1\";s:32:\"caa7132ad30dd00188a11c86c9cea3c0\";}'); +/*!40000 ALTER TABLE `ajxp_user_prefs` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_user_rights` +-- + +DROP TABLE IF EXISTS `ajxp_user_rights`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_user_rights` ( + `rid` int(11) NOT NULL AUTO_INCREMENT, + `login` varchar(255) NOT NULL, + `repo_uuid` varchar(33) NOT NULL, + `rights` mediumtext NOT NULL, + PRIMARY KEY (`rid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_user_rights` +-- + +LOCK TABLES `ajxp_user_rights` WRITE; +/*!40000 ALTER TABLE `ajxp_user_rights` DISABLE KEYS */; +INSERT INTO `ajxp_user_rights` VALUES (3,'admin','ajxp.admin','1'),(4,'admin','ajxp.roles','$phpserial$a:2:{s:9:\"ROOT_ROLE\";b:1;s:15:\"AJXP_USR_/admin\";b:1;}'); +/*!40000 ALTER TABLE `ajxp_user_rights` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_user_teams` +-- + +DROP TABLE IF EXISTS `ajxp_user_teams`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_user_teams` ( + `team_id` varchar(255) NOT NULL, + `user_id` varchar(255) NOT NULL, + `team_label` varchar(255) NOT NULL, + `owner_id` varchar(255) NOT NULL, + PRIMARY KEY (`team_id`,`user_id`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_user_teams` +-- + +LOCK TABLES `ajxp_user_teams` WRITE; +/*!40000 ALTER TABLE `ajxp_user_teams` DISABLE KEYS */; +/*!40000 ALTER TABLE `ajxp_user_teams` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `ajxp_users` +-- + +DROP TABLE IF EXISTS `ajxp_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ajxp_users` ( + `login` varchar(255) NOT NULL, + `password` varchar(255) NOT NULL, + `groupPath` varchar(255) DEFAULT NULL, + PRIMARY KEY (`login`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `ajxp_users` +-- + +LOCK TABLES `ajxp_users` WRITE; +/*!40000 ALTER TABLE `ajxp_users` DISABLE KEYS */; +INSERT INTO `ajxp_users` VALUES ('admin','sha256:1000:C/D/peaeK6CjJlYzbNQWrN+4DCOPSDsz:2bchUvfOzB1q52zKERKwEb2C8LPhOdkc','/'); +/*!40000 ALTER TABLE `ajxp_users` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2014-03-24 18:08:30 diff --git a/conf/nginx.conf b/conf/nginx.conf new file mode 100644 index 0000000..672c25d --- /dev/null +++ b/conf/nginx.conf @@ -0,0 +1,24 @@ +location PATHTOCHANGE { + alias ALIASTOCHANGE; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + + index index.php; + + location ~ \.php$ { + fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name; + fastcgi_param PATH_INFO $fastcgi_path_info; + include fastcgi_params; + } + +} + +location ~* ^PATHTOCHANGE/(?:\.|conf|data/(?:files|personal|logs|plugins|tmp|cache)|plugins/editor.zoho/agent/files) { + deny all; +} + +location ~* PATHTOCHANGE/data/public/.*.(ser|htaccess)$ { + deny all; +} diff --git a/manifest.json b/manifest.json new file mode 100644 index 0000000..b333cc3 --- /dev/null +++ b/manifest.json @@ -0,0 +1,33 @@ +{ + "name": "Pydio", + "id": "pydio", + "description": { + "en": "File sharing platform", + "fr": "Plateforme de partage de fichiers" + }, + "developer": { + "name": "julienmalik", + "email": "julien.malik@paraiso.me", + "url": "https://github.com/julienmalik" + }, + "multi_instance": "false", + "arguments": { + "install" : [ + { + "name": "domain", + "ask": { + "en": "Choose a domain for Pydio" + }, + "example": "domain.org" + }, + { + "name": "path", + "ask": { + "en": "Choose a path for Pydio" + }, + "example": "/pydio", + "default": "/pydio" + } + ] + } +} diff --git a/scripts/install b/scripts/install new file mode 100644 index 0000000..963a023 --- /dev/null +++ b/scripts/install @@ -0,0 +1,54 @@ +#!/bin/bash + +# Retrieve arguments +domain=$1 +path=$2 + +# Check domain/path availability +sudo yunohost app checkurl $domain$path -a pydio +if [[ ! $? -eq 0 ]]; then + exit 1 +fi + +mkdir ../upstream +version=$(cat version) +wget -O ../upstream/pydio-core.tar.gz http://sourceforge.net/projects/ajaxplorer/files/pydio/dev-channel/$version/pydio-core-$version.tar.gz +tar xzf ../upstream/pydio-core.tar.gz -C ../upstream + +# Copy files to the right place +final_path=/var/www/pydio + +sudo mkdir -p $final_path +sudo cp -ar ../upstream/pydio-core-$version/* $final_path + +# Fix up permissions +sudo chown -R www-data: $final_path + +# Database +db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p') +db_user=pydio +sudo yunohost app initdb $db_user -p $db_pwd -s $(readlink -e ../conf/create.mysql) +sudo yunohost app setting pydio mysqlpwd -v $db_pwd + +sed -i "s@YNH_MYSQL_PWD@$db_pwd@g" ../conf/bootstrap.json +sudo mkdir -p $final_path/data/plugins/boot.conf +sudo cp ../conf/bootstrap.json $final_path/data/plugins/boot.conf/bootstrap.json + +sudo touch $final_path/data/cache/admin_counted +sudo touch $final_path/data/cache/first_run_passed +# TODO php-fpm output_buffering OFF +sudo touch $final_path/data/cache/diag_result.php + +sudo find $final_path -name "*" -type f -exec chmod 644 {} \; +sudo find $final_path -name "*" -type d -exec chmod 755 {} \; + +# Nginx configuration +sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf +sed -i "s@ALIASTOCHANGE@$final_path@g" ../conf/nginx.conf +sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/pydio.conf +sudo chown root: /etc/nginx/conf.d/$domain.d/pydio.conf +sudo chmod 600 /etc/nginx/conf.d/$domain.d/pydio.conf + +# Reload Nginx and regenerate SSOwat conf +sudo service nginx reload +sudo yunohost app ssowatconf diff --git a/scripts/remove b/scripts/remove new file mode 100644 index 0000000..3e43145 --- /dev/null +++ b/scripts/remove @@ -0,0 +1,15 @@ +#!/bin/bash + +# Removing executable files +sudo rm -rf /var/www/pydio +domain=$(sudo yunohost app setting pydio domain) +sudo rm -f /etc/nginx/conf.d/$domain.d/pydio.conf + +# Trash db +db_user=pydio +db_name=pydio +root_pwd=$(sudo cat /etc/yunohost/mysql) +mysql -u root -p$root_pwd -e "DROP DATABASE $db_name ; DROP USER $db_user@localhost ;" + +# Restarting services +sudo service nginx reload diff --git a/scripts/upgrade b/scripts/upgrade new file mode 100644 index 0000000..c429a3b --- /dev/null +++ b/scripts/upgrade @@ -0,0 +1,4 @@ +#!/bin/bash + +echo "TODO" +exit 1 \ No newline at end of file diff --git a/scripts/version b/scripts/version new file mode 100644 index 0000000..3884b9b --- /dev/null +++ b/scripts/version @@ -0,0 +1 @@ +5.3.3 \ No newline at end of file