OwnCloud



Owncloud is a market-leading online file sharing system that lets you back up and shares your files with ease. If you are not a fan of DropBox or Google Drive, then OwnCloud is a cool alternative. In this article, we walk you through the installation of OwnCloud in Debian 10. Step 1: Install LAMP Stack on Debian. On ownCloud apps (enable/disable) and administrative actions from the command line. File Firewall Admin feature for application level file access rules to protect files in the enterprise. Inspects file requests made on an ownCloud server, and prevents ownCloud from executing any code if the firewall rules are met.

Owncloud Server Setup

Options¶

You have the option of starting your ownCloud desktop client with theowncloud command. The following options are supported:

owncloud-h or owncloud--help
Displays all command options.

The other options are:

--logwindow
Opens a window displaying log output.
--logfile<filename>
Write log output to the file specified. To write to stdout, specify -as the filename.
--logdir<name>
Writes each synchronization log output in a new file in the specifieddirectory.
--logexpire<hours>
Removes logs older than the value specified (in hours). This command isused with --logdir.
--logflush
Clears (flushes) the log file after each write action.
--logdebug
Also output debug-level messages in the log (equivalent to setting the env var QT_LOGGING_RULES=”qt.*=true;*.debug=true”).

)

--confdir<dirname>
Uses the specified configuration directory.

Configuration File¶

The ownCloud Client reads a configuration file. You can locate this configuration file as follows:

On Linux distributions:
$HOME/.config/ownCloud/owncloud.cfg
On Microsoft Windows systems:
%APPDATA%ownCloudowncloud.cfg
On MAC OS X systems:
$HOME/Library/Preferences/ownCloud/owncloud.cfg

The configuration file contains settings using the Microsoft Windows .ini fileformat. You can overwrite changes using the ownCloud configuration dialog.

Note

Owncloud desktop client

Owncloud Download

OwnCloud

Use caution when making changes to the ownCloud Client configurationfile. Incorrect settings can produce unintended results.

Some interesting values that can be set on the configuration file are:

[ownCloud] section
VariableDefaultMeaning
remotePollInterval30000Specifies the poll time for the remote repository in milliseconds.
forceSyncInterval7200000The duration of no activity after which a synchronization run shall be triggered automatically.
fullLocalDiscoveryInterval3600000The interval after which the next synchronization will perform a full local discovery.
notificationRefreshInterval300000Specifies the default interval of checking for new server notifications in milliseconds.
[General] section
VariableDefaultMeaning
chunkSize5242880Specifies the chunk size of uploaded files in bytes.
promptDeleteAllFilestrueIf a UI prompt should ask for confirmation if it was detected that all files and folders were deleted.
maxLogLines20000Specifies the maximum number of log lines displayed in the log window.
timeout300The timeout for network connections in seconds.
moveToTrashfalseIf non-locally deleted files should be moved to trash instead of deleting them completely.This option only works on linux
showExperimentalOptionsfalseWhether to show experimental options that are still undergoing testing in the user interface.Turning this on does not enable experimental behavior on its own. It does enable user inferfaceoptions that can be used to opt in to experimental features.
[Proxy] section
VariableDefaultMeaning
host127.0.0.1The address of the proxy server.
port8080The port were the proxy is listening.
type20 for System Proxy.
1 for SOCKS5 Proxy.
2 for No Proxy.
3 for HTTP(S) Proxy.

Owncloud Vs Nextcloud

Environment Variables¶

Owncloud.org

The behavior of the client can also be controlled using environment variables. The value of the environment variables overrides the values in the configuration file.

The environment variables are:

  • OWNCLOUD_CHUNK_SIZE (default: 5242880; 5 MiB) – Specifies the chunk size of uploaded files in bytes. Increasing this value may help with synchronization problems in certain configurations.
  • OWNCLOUD_TIMEOUT (default: 300 s) – The timeout for network connections in seconds.
  • OWNCLOUD_CRITICAL_FREE_SPACE_BYTES (default: 50*1000*1000 bytes) - The minimum disk space needed for operation. A fatal error is raised if less free space is available.
  • OWNCLOUD_FREE_SPACE_BYTES (default: 250*1000*1000 bytes) - Downloads that would reduce the free space below this value are skipped. More information available under the “Low Disk Space” section.
  • OWNCLOUD_MAX_PARALLEL (default: 6) - Maximum number of parallel jobs.
  • OWNCLOUD_BLACKLIST_TIME_MIN (default: 25 s) - Minimum timeout for blacklisted files.
  • OWNCLOUD_BLACKLIST_TIME_MAX (default: 24*60*60 s; one day) - Maximum timeout for blacklisted files.

Owncloud Client

ownCloud Command Line Client¶

The ownCloud Client packages contain a command line client, owncloudcmd, that canbe used to synchronize ownCloud files to client machines.

owncloudcmd performs a single sync run and then exits the synchronizationprocess. In this manner, owncloudcmd processes the differences betweenclient and server directories and propagates the files to bring bothrepositories to the same state. Contrary to the GUI-based client,owncloudcmd does not repeat synchronizations on its own. It also does notmonitor for file system changes.

To invoke owncloudcmd, you must provide the local and the remote repositoryURL using the following command:

Owncloud Vs Nextcloud

where sourcedir is the local directory and owncloudurl isthe server URL.

Raspberry

Other command line switches supported by owncloudcmd include the following:

--user, -u[user]
Use user as the login name.
--password, -p[password]
Use password as the password.
-n
Use netrc(5) for login.
--non-interactive
Do not prompt for questions.
--silent, --s
Inhibits verbose log output.
--trust
Trust any SSL certificate, including invalid ones.
--httpproxyhttp://[user@pass:]<server>:<port>
Uses server as HTTP proxy.
--nonshib
Uses Non Shibboleth WebDAV Authentication
--davpath[path]
Overrides the WebDAV Path with path
--exclude[file]
Exclude list file
--unsyncedfolders[file]
File containing the list of un-synced remote folders (selective sync)
--max-sync-retries[n]
Retries maximum n times (defaults to 3)
-h
Sync hidden files,do not ignore them

Credential Handling¶

owncloudcmd requires the user to specify the username and password using the standard URL pattern, e.g.,

To synchronize the ownCloud directory Music to the local directorymedia/music, through a proxy listening on port 8080, and on a gatewaymachine using IP address 192.168.178.1, the command line would be:

Owncloud desktop app

owncloudcmd will prompt for the user name and password, unless they havebeen specified on the command line or -n has been passed.

Exclude List¶

owncloudcmd requires access to an exclude list file. It must either beinstalled along with owncloudcmd and thus be available in a system location,be placed next to the binary as sync-exclude.lst or be explicitly specifiedwith the --exclude switch.

Low Disk Space¶

When disk space is low the ownCloud Client will be unable to synchronize all files. This section describes its behavior in a low disk space situation as well as the options that influence it.

  1. Synchronization of a folder aborts entirely if the remaining disk space falls below 50 MB. This threshold can be adjusted with the OWNCLOUD_CRITICAL_FREE_SPACE_BYTES environment variable.
  2. Downloads that would reduce the free disk space below 250 MB will be skipped or aborted. The download will be retried regularly and other synchronization is unaffected. This threshold can be adjusted with the OWNCLOUD_FREE_SPACE_BYTES environment variable.