### Download example theme Source: https://doc.owncloud.com/server/10.16/developer_manual/core/theming.html Download the example theme from GitHub using wget. This provides a starting point for creating your custom theme. ```bash wget https://github.com/owncloud/theme-example/archive/master.zip ``` -------------------------------- ### Install Node.js and Build Tools on Ubuntu Source: https://doc.owncloud.com/server/10.16/developer_manual/general/devenv.html Installs Node.js, make, unzip, and git using the nodesource setup script and apt-get. ```bash cd ~ curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh sudo bash nodesource_setup.sh sudo apt-get -y -q update sudo apt-get -y -q upgrade sudo apt-get install nodejs build-essential make unzip git ``` -------------------------------- ### MariaDB Version Output Example Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/manual_installation_db.html Example output indicating a successful MariaDB installation and active service status. ```text mysqladmin Ver 9.1 Distrib 10.4.21-MariaDB, for debian-linux-gnu on x86_64 Copyright (c) 2000, 2021, Oracle, MariaDB Corporation Ab and others. Server version 10.4.21-MariaDB-1:10.4.21+maria~bionic Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/run/mysqld/mysqld.sock Uptime: 59 min 51 sec Threads: 16 Questions: 891020 Slow queries: 0 Opens: 119 Flush tables: 1 Open tables: 113 Queries per second avg: 248.125 ``` -------------------------------- ### Prepare and Install Composer Source: https://doc.owncloud.com/server/10.16/developer_manual/general/devenv.html Downloads and verifies the Composer installer, then installs it to /usr/local/bin. ```bash cd ~/tmp sudo apt-get install wget php-cli php-zip php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" HASH="$(wget -q -O - https://composer.github.io/installer.sig)" php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" ``` ```bash sudo php composer-setup.php \ --install-dir=/usr/local/bin \ --filename=composer ``` -------------------------------- ### Start Infinite Scale with Minimal Services for Migration Source: https://doc.owncloud.com/ocis/8.0/migration/upgrading_3.0.0_4.0.0.html Start Infinite Scale with only the necessary services (gateway, nats, storage-system, storage-users) to perform the space index migration. This method uses the binary installation. ```bash OCIS_RUN_SERVICES="gateway,nats,storage-system,storage-users" \ ocis server ``` -------------------------------- ### Prepare and Install ownCloud for Acceptance Tests Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/acceptance-tests.html Commands to prepare the ownCloud installation by removing existing configurations and databases, then performing a command-line installation. ```bash # Remove current configuration (if existing) sudo rm -rf $installation_path/data/* sudo rm -rf $installation_path/config/* # Remove existing 'owncloud' database mysql -u root -h localhost -e "drop database owncloud" mysql -u root -h localhost -e "drop user oc_admin" mysql -u root -h localhost -e "drop user oc_admin@localhost" # Install ownCloud server with the command-line sudo -u www-data ./occ maintenance:install \ --database='mysql' --database-name='owncloud' --database-user='root' \ --database-pass='mysqlrootpassword' --admin-user='admin' --admin-pass='admin' ``` -------------------------------- ### Install Subscription Manager Source: https://doc.owncloud.com/server/10.16/admin_manual/maintenance/upgrading/upgrade_php.html Ensure subscription-manager is installed before proceeding with repository setup. This command installs the necessary package. ```bash yum install --assumeyes subscription-manager ``` -------------------------------- ### Install System Prerequisites Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/server_prep_ubuntu_22.04.html Commands to install common system utilities and dependencies. ```bash sudo apt install smbclient ``` ```bash sudo apt install redis-server ``` ```bash sudo apt install unzip ``` ```bash sudo apt install openssl ``` ```bash sudo apt install rsync ``` ```bash sudo apt install imagemagick ``` -------------------------------- ### Enable Windows Installer Logging Source: https://doc.owncloud.com/desktop/6.0/troubleshooting.html Run the MSI installer with the /L*V flag to generate a verbose installation log file. ```bash msiexec /i ownCloud-6.0.0.x64.msi /L*V "C:\log\example.log" ``` -------------------------------- ### Install VNC Viewer Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/ui-testing.html Install a VNC client to observe browser actions during UI tests. ```bash sudo apt install tigervnc-viewer ``` -------------------------------- ### Install ownCloud Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/drone.html Run this command as the web server user to install ownCloud locally. ```bash sudo -u www-data ./occ maintenance:install ``` -------------------------------- ### Install phpMyAdmin via PPA Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/upgrade_install_phpmyadmin.html Install or upgrade phpMyAdmin using the PPA repository. ```bash sudo apt install phpmyadmin ``` -------------------------------- ### Install FFmpeg for Video Previews Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/files/previews_configuration.html Command to install ffmpeg, which is required for the OC\Preview\Movie provider. ```bash sudo apt install -y ffmpeg ``` -------------------------------- ### Example Path Usage Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Example of specifying a path for the file scan command. ```bash --path="/alice/files/Music" ``` -------------------------------- ### Install Apache Web Server Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/server_prep_ubuntu_20.04.html Install the Apache web server and the PHP module. ```bash sudo apt install libapache2-mod-php apache2 ``` -------------------------------- ### Install Yarn on Ubuntu Source: https://doc.owncloud.com/server/10.16/developer_manual/general/devenv.html Adds the Yarn repository and installs the package via apt-get. ```bash # Enable the Yarn repository curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - # Add the Yarn APT repository to your system’s software repository list: echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list # Update the package list and install Yarn: sudo apt-get update sudo apt-get install --no-install-recommends yarn ``` -------------------------------- ### Install PHP 7.4 and Extensions Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/server_prep_ubuntu_20.04.html Commands to install the PHP environment and required modules for ownCloud. ```bash sudo apt install php-fpm php-cgi ``` ```bash sudo apt install php ``` ```bash sudo apt install php-mysql php-mbstring php-intl php-imagick \ php-redis php-apcu php-igbinary php-gmp php-bcmath \ php-curl php-gd php-zip php-imap php-ldap php-bz2 \ php-ssh2 php-phpseclib php-common php-json php-xml \ php-dev libsmbclient-dev php-pear ``` -------------------------------- ### Install Dependencies Source: https://doc.owncloud.com/server/10.16/developer_manual/general/devenv.html Executes the make command to install required PHP and JavaScript dependencies. ```bash # Assuming that the ownCloud source is located in `/var/www/html/core` cd /var/www/html/core && make ``` -------------------------------- ### Install and Enable krb5 PECL Extension Source: https://doc.owncloud.com/server/10.16/admin_manual/enterprise/authentication/kerberos.html Install the krb5 development libraries and then compile and install the krb5 PECL extension for PHP. Ensure the PECL channel is updated first. ```bash sudo apt install libkrb5-dev sudo pecl channel-update pecl.php.net sudo pecl install krb5 bashCopied! ``` -------------------------------- ### Set Instance ID Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/config_sample_php_parameters.html The `instanceid` is a unique identifier for your ownCloud installation. It is automatically generated during installation and must start with a letter. This example shows the format but should not be used directly. ```php 'instanceid' => '', ``` ```php 'instanceid' => '', ``` -------------------------------- ### Setup MySQL for testing Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/unit-testing.html SQL commands to create the test database and user for MySQL backends. ```sql CREATE DATABASE oc_autotest; CREATE USER 'oc_autotest'@'localhost' IDENTIFIED BY 'owncloud'; GRANT ALL ON oc_autotest.* TO 'oc_autotest'@'localhost'; ``` ```sql CREATE DATABASE oc_autotest0; CREATE USER 'oc_autotest0'@'localhost' IDENTIFIED BY 'owncloud'; GRANT ALL ON oc_autotest0.* TO 'oc_autotest0'@'localhost'; ``` -------------------------------- ### Install and Start hsmdaemon System Service Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/security/hsmdaemon/index.html Installs hsmdaemon as a system service and starts it. This ensures the daemon runs automatically on boot. ```bash sudo /usr/local/bin/hsmdaemon install sudo service hsmdaemon start ``` -------------------------------- ### Install Oracle Instant Client Packages Source: https://doc.owncloud.com/server/10.16/admin_manual/enterprise/installation/oracle_db_configuration.html Use these commands on RedHat-based distributions to install the required basic and SDK packages. ```bash rpm --install oracle-instantclient12.2-basic-12.2.0.1.0-1.x86_64.rpm \ oracle-instantclient12.2-devel-12.2.0.1.0-1.x86_64.rpm ``` -------------------------------- ### Install Memcached on Ubuntu/Debian/Mint Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/caching_configuration.html Install the `memcached` server and the `php-memcached` module on Ubuntu-based systems. The installer automatically starts `memcached` and configures it for startup. ```bash sudo apt-get install memcached php-memcached ``` -------------------------------- ### Prepare Testing Environment Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/unit-testing.html Run this command in the webroot directory to install dependencies and a local PHPUnit version. ```bash make ``` -------------------------------- ### Get App Installation Path Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Retrieves the full file system path where an app is installed. ```APIDOC ## CLI app:getpath ### Description Returns the absolute path to the directory of the specified app. ### Command `sudo -u www-data ./occ app:getpath ` ### Arguments - **app** (string) - Required - The name of the app. ``` -------------------------------- ### Get App Installation Path Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Retrieves the full file system path for a specific installed app. ```bash sudo -u www-data ./occ app:getpath notifications ``` -------------------------------- ### Instance preparation script (instance.sh) Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/script_guided_install.html This script sets environment variables and calls the preparation script. Ensure it is saved in the same directory as owncloud_prep.sh. ```bash #!/bin/bash # Script Version 2022.06.23 # This script prepares the parameters for owncloud_prep.sh # Handy if you have more instances to maintain where the process stays the same with different parameters # The processing script is expected in the same directory of this script. # To setup this script for your environment, adopt the following variables to your needs: # # ocname the name of your directory containing the owncloud files # ocroot the path to ocname, usually /var/www (no trailing slash) # linkroot the path to your source directory for linking data and apps-external (no trailing slash) # htuser the webserver user # htgroup the webserver group # rootuser the root user ocname='owncloud' ocroot='/var/www' linkroot='/mnt/owncloud_data' htuser='www-data' htgroup='www-data' rootuser='root' if [ "$(id -u)" != 0 ]; then printf "\nThis script should be run as root user to allow filesystem modifications\nExiting\n\n" fi printf "\nConsider backing up the database before you continue when upgrading!\n\n" # Resolve the absolute path this script is located and expects the called script to be there too DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" $DIR/owncloud_prep.sh "$ocname" "$ocroot" "$linkroot" "$htuser" "$htgroup" "$rootuser" ``` -------------------------------- ### Install specific features using Whitelist Source: https://doc.owncloud.com/desktop/6.0/installing.html Explicitly name the features you want to install, ensuring 'Client' is always included. ```bash msiexec /passive /i ownCloud-6.0.0.x64.msi ADDDEFAULT=StartMenuShortcuts ``` -------------------------------- ### Install mod-shib Source: https://doc.owncloud.com/server/10.16/admin_manual/enterprise/user_management/saml_2.0_sso.html Installs the mod-shib package and its dependencies, including the shibd daemon. This command is used for initial setup. ```bash sudo apt-get install libapache2-mod-shib2 ``` -------------------------------- ### Initialize Let's Encrypt Directory Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/letsencrypt/using_letsencrypt.html Create the necessary configuration and script files in the /etc/letsencrypt directory. ```bash cd /etc/letsencrypt sudo touch cli.ini list.sh renew.sh renew-cron.sh delete.sh .sh ``` -------------------------------- ### Example .user.ini Configuration Line Source: https://doc.owncloud.com/server/10.16/admin_manual/maintenance/upgrading/manual_upgrade.html An example configuration line from a '.user.ini' file, showing a setting for 'post_max_size'. This is often compared during upgrade processes to ensure correct settings are reapplied. ```plaintext post_max_size=513M | post_max_size=1G ``` -------------------------------- ### Install ownCloud Desktop App on Windows (No Desktop Shortcut) Source: https://doc.owncloud.com/desktop/6.0/installing.html This command installs the Desktop App while disabling the creation of a desktop shortcut. It's an example of how to customize MSI installations by removing specific features. ```bash msiexec /passive /i ownCloud-6.0.0.x64.msi REMOVE=DesktopShortcut ``` -------------------------------- ### Execute Core Migration Example Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Example of executing a migration step for the core ownCloud app. ```bash sudo -u www-data ./occ migrations:execute core 20181220085457 ``` -------------------------------- ### GET /ocs/v1.php/cloud/apps/ Source: https://doc.owncloud.com/server/10.16/developer_manual/core/apis/provisioning-api.html Retrieves a list of installed applications on the ownCloud server. ```APIDOC ## GET ocs/v1.php/cloud/apps/ ### Description Returns a list of apps installed on the ownCloud server. ### Method GET ### Endpoint ocs/v1.php/cloud/apps/ ### Parameters #### Query Parameters - **filter** (string) - Optional - Whether to retrieve enabled or disabled apps. Available values are 'enabled' and 'disabled'. ``` -------------------------------- ### Install Apache Web Server with PHP Module Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/server_prep_ubuntu_22.04.html Installs the Apache web server along with the PHP 7.4 module. Note that using `php-fpm` is a non-standard setup not covered by this document. ```bash sudo apt install libapache2-mod-php7.4 apache2 ``` -------------------------------- ### OCS Share API - Get All Shares Example (JSON) Source: https://doc.owncloud.com/server/10.16/developer_manual/core/apis/ocs-share-api.html Retrieves files shared with the current user in JSON format. This example demonstrates the structure of a successful response with share details. ```json { "ocs": { "meta": { "status": "ok", "statuscode": 100, "message": null, "totalitems": "", "itemsperpage": "" }, "data": [ { "id": "1", "share_type": 0, "uid_owner": "testuser", "displayname_owner": "test user", "permissions": 19, "stime": 1564484858, "parent": null, "expiration": null, "token": null, "uid_file_owner": "testuser", "displayname_file_owner": "test user", "state": 1, "path": "/ownCloud Manual.pdf", "item_type": "file", "mimetype": "application/pdf", "storage_id": "home::testuser", "storage": 3, "item_source": 97, "file_source": 97, "file_parent": 57, "file_target": "/ownCloud Manual.pdf", "share_with": "admin", "share_with_displayname": "admin", "share_with_additional_info": null, "mail_send": 0, "attributes": null } ] } } ``` -------------------------------- ### Example: Create Addressbook 'mollybook' for User 'molly' Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html An example of creating an address book named 'mollybook' for the user 'molly'. The address book becomes immediately visible to the user. ```bash sudo -u www-data ./occ dav:create-addressbook molly mollybook ``` -------------------------------- ### Get Apps via cURL Source: https://doc.owncloud.com/server/10.16/developer_manual/core/apis/provisioning-api.html Retrieves a list of installed apps, optionally filtered by status. ```bash # Gets enabled apps curl http://admin:secret@example.com/ocs/v1.php/cloud/apps?filter=enabled ``` ```xml 100 ok files provisioning_api ``` -------------------------------- ### YAML Configuration Example Source: https://doc.owncloud.com/ocis/8.0/deployment/services/s-list/clientlog.html Example of a YAML configuration file for the clientlog service. Ensure the file is correctly named and placed according to conventions. Environment variables can be used within this file. ```yaml # Autogenerated ``` -------------------------------- ### OCS Share API - Get All Shares Example (XML) Source: https://doc.owncloud.com/server/10.16/developer_manual/core/apis/ocs-share-api.html Retrieves files shared with the current user in XML format. This example shows the structure of a successful response containing share details. ```xml ok 100 115468 3 auser A User 1 1481537775 MMqyHrR0GTepo4B auser A User /Photos/Paris.jpg file image/jpeg home::auser 993 3994486 3994486 3994485 /Shared/Paris.jpg https://your.owncloud.install.com/owncloud/index.php/s/MMqyHrR0GTepo4B 0 ``` -------------------------------- ### Install Recommended Packages Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/quick_guides/ubuntu_20_04.html Installs additional utility packages that are helpful for debugging and system management, such as unzip, bzip2, rsync, curl, jq, ping, ldap-utils, and smbclient. ```bash apt install -y \ unzip bzip2 rsync curl jq \ inetutils-ping ldap-utils\ smbclient ``` -------------------------------- ### Directory Structure for Compilation Scripts Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/compile_samba.html Example directory structure for organizing Samba compilation and installation scripts. ```text opt/ bootstrap.sh compile_samba.sh install_samba.sh samba-4.10.18 ``` -------------------------------- ### Start with Trusted CA Certificates Source: https://doc.owncloud.com/ocis/8.0/deployment/general/general-info.html Starts the server using custom certificates by providing the paths to the key and certificate files. ```bash OCIS_INSECURE=false \ PROXY_HTTP_ADDR=0.0.0.0:9200 \ OCIS_URL=https://localhost:9200 \ PROXY_TRANSPORT_TLS_KEY=./certs/your-host.key \ PROXY_TRANSPORT_TLS_CERT=./certs/your-host.crt \ ocis server ``` -------------------------------- ### Start Selenium Standalone Server Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/ui-testing.html Launch the Selenium standalone server locally. Ensure you have Java installed and the Selenium server JAR file and browser web drivers in the same directory. This command starts the server on port 4445. ```bash java -jar selenium-server-standalone-3.12.0.jar \ -port 4445 \ -enablePassThrough false ``` -------------------------------- ### Clone and Install ownCloud Theme Source: https://doc.owncloud.com/server/10.16/developer_manual/core/theming.html Function to download the example theme zip, verify its integrity, and move it to the target application directory. ```bash function clone_example_theme { local APP_NAME="$1" local INSTALL_BASE_DIR="$2" local MAINFILE=master.zip local UNZIPDIR=/tmp local MASTERNAME=theme-example-master local DOWNLOAD_FILE=$UNZIPDIR/$MAINFILE local THEME_ARCHIVE_URL=https://github.com/owncloud/theme-example/archive/master.zip # check if the app name already exists if [ -d "$INSTALL_BASE_DIR/$APP_NAME" ] then echo "An app with name ('$INSTALL_BASE_DIR/$APP_NAME') already exists." echo "Please remove or rename it before running this script again." return 1 fi; # delete an existing downloaded zip file if [ -e "$DOWNLOAD_FILE" ] then rm "$DOWNLOAD_FILE" fi echo "Downloading ownCloud example theme." # getting the example theme from git if ! wget --output-document="$DOWNLOAD_FILE" --tries=3 --continue \ --timeout=3 --dns-timeout=3 --connect-timeout=3 --read-timeout=3 \ "$THEME_ARCHIVE_URL" >/dev/null 2>&1 then echo "Download error, exiting" return 1 fi # first test if unzip would error then extract if unzip -t "$DOWNLOAD_FILE" >/dev/null 2>&1 then # unzip with overwriting existing files and directories and suppressed output echo "Unzipping download" unzip -oq "$DOWNLOAD_FILE" -d "$UNZIPDIR" echo "Moving to target location" mv "$UNZIPDIR/$MASTERNAME" "$INSTALL_BASE_DIR/$APP_NAME" echo "Removing download" rm "$DOWNLOAD_FILE" else echo "Cannot complete setup of the ownCloud example theme as it is corrupted." return 1 fi } ``` -------------------------------- ### Setup PostgreSQL for testing Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/unit-testing.html Commands to configure PostgreSQL users and privileges for test databases. ```bash su - postgres ``` ```sql # Use password "owncloud" createuser -P oc_autotest # Give the user the privilege to create databases psql -c 'ALTER USER oc_autotest CREATEDB;' ``` ```bash su - postgres ``` ```sql # Use password "owncloud" createuser -P oc_autotest0 # Give the user the privilege to create databases psql -c 'ALTER USER oc_autotest0 CREATEDB;' ``` -------------------------------- ### Install libseccomp2 on Raspberry Pi (Debian Buster) Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/docker/index.html If ownCloud containers fail to start on Raspberry Pi or other ARM devices due to an old libseccomp2 version, download and install the updated .deb package. This is typically needed for Rasbian Buster 32-bit. ```bash cd /tmp wget http://ftp.us.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.1-1_armhf.deb sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb bashCopied! ``` -------------------------------- ### View maintenance:install Help Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Displays usage information and available options for the maintenance:install command. ```bash sudo -u www-data ./occ help maintenance:install ``` -------------------------------- ### HSM Daemon Server Listening Output Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/security/hsmdaemon/index.html Example console output when the HSM daemon starts successfully, indicating the host, port, and version it is listening on. ```json { "level": "info", "ts": "2019-02-14T09:32:59.081+0100", "caller": "hsmdaemon/hsmdaemon.go:146", "msg": "Server listening", "host": "localhost", "port": 8513, "version": "0.0.7", "build": "2019-02-08T10:47:55+00:00" } ``` -------------------------------- ### Example JSON Configuration Output Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Sample output format when querying application configuration details. ```json { "apps": { "files_versions": { "enabled": "yes", "installed_version": "1.3.0", "types": "filesystem" } } } ``` -------------------------------- ### Setup Cron Job for WND Queue Processing Source: https://doc.owncloud.com/server/10.16/admin_manual/enterprise/external_storage/windows-network-drive_configuration.html Example command for a cron job to process the WND queue with a file serializer. The first execution creates the serialized file. ```bash sudo -u www-data ./occ wnd:process-queue host share -c 500 \ --serializer-type file \ --serializer-param file=/opt/oc/store1 ``` -------------------------------- ### Execute theme bootstrap script Source: https://doc.owncloud.com/server/10.16/developer_manual/core/theming.html Run the theme-bootstrap.sh script with the desired theme name and ownCloud installation path as arguments. This script automates the creation of a new theme based on the example. ```bash theme-bootstrap.sh mynewtheme /var/www/owncloud ``` -------------------------------- ### Define Given Steps in Scenarios Source: https://doc.owncloud.com/server/10.16/developer_manual/testing/acceptance-tests.html Example of using Given steps to establish the initial system state for a file deletion scenario. ```gherkin Scenario: delete files in a sub-folder Given user "Alice" has been created And user "Alice" has moved file "/welcome.txt" to "/FOLDER/welcome.txt" And user "Alice" has created a folder "/FOLDER/SUBFOLDER" And user "Alice" has copied file "/textfile0.txt" to "/FOLDER/SUBFOLDER/testfile0.txt" ``` -------------------------------- ### Get List of Commits in a PR Source: https://doc.owncloud.com/server/10.16/developer_manual/general/backporting.html Fetches the list of individual commits belonging to a Pull Request, excluding the merge commit itself. It uses the first parent of the merge commit as the starting point. ```shell commitList=$(git log --no-merges --reverse --format=format:%h $1^..$1) ``` -------------------------------- ### Server-side Route Configuration (Single Route) Source: https://doc.owncloud.com/server/10.16/developer_manual/app/tutorial/routes_and_controllers.html A minimal example showing how to define a single route, mapping the root URL '/' to a GET request handled by the 'page#index' controller action. ```php [ ['name' => 'page#index', 'url' => '/', 'verb' => 'GET'] ]]; ``` -------------------------------- ### Initialize Infinite Scale Source: https://doc.owncloud.com/ocis/8.0/deployment/general/general-info.html Commands to initialize the Infinite Scale instance or view help documentation. ```bash ocis init ``` ```bash ocis init --help ``` -------------------------------- ### Create Default smb.conf Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/compile_samba.html Copies the default smb.conf from examples to the Samba configuration directory if it does not already exist. Does not overwrite existing configurations. ```bash sudo cp -n examples/smb.conf.default /etc/samba/smb.conf ``` -------------------------------- ### Configure PHP Mailer Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/email_configuration.html Use this configuration to send emails via PHP's mail function. Ensure a working email system is installed on your server. This example sets basic parameters for PHP mail. ```php 'mail_smtpmode' => 'php', 'mail_smtphost' => '127.0.0.1', 'mail_smtpport' => 25, 'mail_smtptimeout' => 10, 'mail_smtpsecure' => '', 'mail_smtpauth' => false, 'mail_smtpauthtype' => 'LOGIN', 'mail_smtpname' => '', 'mail_smtppassword' => '' ``` -------------------------------- ### Test API with cURL Source: https://doc.owncloud.com/server/10.16/developer_manual/app/tutorial/restful_api.html Example of how to test the RESTful API using cURL. This command fetches all notes via a GET request. Ensure you replace 'user:password' and the URL with your actual credentials and server address. ```bash curl -u user:password http://localhost:8080/index.php/apps/ownnotes/api/0.1/notes ``` -------------------------------- ### YAML Configuration Example Source: https://doc.owncloud.com/ocis/8.0/deployment/services/s-list/invitations.html This is an example YAML configuration file. Ensure it is renamed and placed in the correct folder according to the Configuration File Naming conventions to be effective. Refer to the Notes for Environment Variables for using environment variables within the YAML file. ```yaml # Autogenerated # Filename: invitations-config-example.yaml tracing: enabled: false type: "" endpoint: "" collector: "" log: level: "" pretty: false color: false file: "" debug: addr: 127.0.0.1:9269 token: "" pprof: false zpages: false http: addr: 127.0.0.1:9265 root: /graph/v1.0 cors: allow_origins: - https://localhost:9200 allow_methods: [] allow_headers: [] allow_credentials: false tls: enabled: false cert: "" key: "" keycloak: base_path: "" client_id: "" client_secret: "" client_realm: "" user_realm: "" insecure_skip_verify: false token_manager: jwt_secret: "" ``` -------------------------------- ### Fatal Error Log for Unconfigured Service Account Source: https://doc.owncloud.com/ocis/8.0/migration/upgrading_4.0.0_5.0.0.html Example log message indicating a fatal error when the service account ID is not configured, preventing Infinite Scale from starting. This typically occurs during upgrades if manual configuration is not performed. ```plaintext The service account id has not been configured for graph. Make sure your ... ``` -------------------------------- ### Example OpenID Connect Configuration for ownCloud Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/user/oidc/kopano-setup.html Add this snippet to your ownCloud `config.php` file to configure the OpenID Connect settings. Ensure the `provider-url`, `client-id`, and `client-secret` are set according to your Kopano Konnect setup. The `mode` and `search-attribute` may need adjustment based on your identity provider configuration. ```php 'openid-connect' => [ 'provider-url' => 'https://idp.example.com', 'client-id' => '', 'client-secret' => '', 'loginButtonName' => 'Kopano', 'autoRedirectOnLoginPage' => false, // change this to 'email' if necessary (see identity provider configuration) 'mode' => 'userid', // change this to suit your environment (see identity provider configuration) 'search-attribute' => 'preferred_username' ], ``` -------------------------------- ### List Configurations Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Displays all configuration values for the ownCloud setup or specific apps. ```bash sudo -u www-data ./occ config:list [options] [--] [] ``` -------------------------------- ### CLI: Maintenance Installation Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/occ_command.html Installs ownCloud via the command line using the maintenance:install command. ```APIDOC ## CLI Command: maintenance:install ### Description Installs ownCloud entirely from the command line, bypassing the graphical Installation Wizard. ### Parameters - **--database** (string) - Optional - Supported database type (mysql, oci, pgsql, sqlite). Default: sqlite. - **--database-connection-string** (string) - Optional - Oracle-specific connection string. - **--database-name** (string) - Optional - Name of the database. - **--database-host** (string) - Optional - Hostname of the database. Default: localhost. - **--database-user** (string) - Optional - User name to connect to the database. - **--database-pass** (string) - Optional - Password of the database user. - **--database-table-prefix** (string) - Optional - Prefix for all tables. Default: oc_. - **--admin-user** (string) - Optional - Admin account username. - **--admin-pass** (string) - Optional - Admin account password. - **--data-dir** (string) - Optional - Path to data directory. Default: /var/www/owncloud/data ``` -------------------------------- ### Install libsmbclient-php Extension Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/manual_installation/server_prep_ubuntu_20.04.html Steps to update PECL channels, install the smbclient extension, and restart the web server. ```bash sudo pecl channel-update pecl.php.net ``` ```bash sudo pecl install smbclient ``` ```bash sudo service apache2 restart ``` -------------------------------- ### Install OCI8 PHP Extension Source: https://doc.owncloud.com/server/10.16/admin_manual/enterprise/installation/oracle_db_configuration.html Install the OCI8 extension via PECL, specifying the version compatible with your PHP installation. ```bash sudo pecl install oci8-2.2.0 ``` -------------------------------- ### Import Database on New Server Source: https://doc.owncloud.com/server/10.16/admin_manual/maintenance/migrating.html Imports the backed-up ownCloud database on the new server. Ensure the database 'owncloud' already exists and credentials are correct. ```bash mysql -h localhost -u admin -ppassword owncloud < owncloud-dbbackup.bak ``` -------------------------------- ### Install and Enable SMB Client PHP Module Source: https://doc.owncloud.com/server/10.16/admin_manual/installation/quick_guides/ubuntu_22_04.html Installs the smbclient PHP module for external SMB storage access, enables it, and restarts Apache. ```bash apt-get install -y php7.4-smbclient echo "extension=smbclient.so" > /etc/php/7.4/mods-available/smbclient.ini phpenmod smbclient systemctl restart apache2 ``` ```bash php -m | grep smbclient ``` -------------------------------- ### Current ownCloud Installation Version Source: https://doc.owncloud.com/server/10.16/admin_manual/configuration/server/config_sample_php_parameters.html Stores the current version number of the ownCloud installation. This is typically set during installation and updates and should not usually be changed. ```php 'version' => '', ```