Project

General

Profile

Owncloud cli cheatsheet » History » Version 3

Jessie Lee, 03/16/2016 01:47 PM

1 1 Jessie Lee
{{lastupdated_at}} by {{lastupdated_by}}
2
3
{{>toc}}
4
5
h1. Owncloud cli cheatsheet
6
7
h2. Architecture 
8
9
* Owncloud by default is installed to /var/www/owncloud
10
* The apache conf file is in /etc/apache2/conf-available/owncloud.conf
11
** by default this redirects any http[s[://[url]/owncloud to the owncloud directory
12
** I often change this to redirect / to owncloud if on subdomain or office fileserver
13
* owncloud config file is in /var/www/owncloud/config/config.php
14
** note: if setting changes in the config file do not take, check the permissions for this file
15
* the owncloud directory also has a detailed .htaccess file that is vital to the security of owncloud
16
* The data directory can be found in the config file and is also the location of the owncloud.log file
17
** the data directory can and at office servers is often supplemented or replaced by local storage or SMB
18 2 Jessie Lee
* the backend database is mysql which is used by default for everything.
19
** some larger installs (ex. NDWA) use redis instead of mysql for file locking. 
20
* caching is performed by memcached or redis
21 3 Jessie Lee
22
h2. OCC
23
24
Occ is the cli command tool for owncloud. Through this tool most user/file/maintenance operations can be performed. 
25
detailed instructions can be found here https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html
26
27
key notes/favorite commands: 
28
29
* Occ must be run as the www-data user! 
30
** 8.0+ should no longer even allow running as root but if that happens there might be a permission mess to deal with!
31
** always use sudo -u www-data php occ (I have aliased this to occ)
32
* occ upgrade is needed for any major or minor release of owncloud!
33
** this will do a database upgrade test and then perform the upgrade
34
** for larger installs, this could take some time so only perform this during off hours. 
35
* occ maintenance:mode --off/--on this will gracefully close connections and turn on maintenance mode (or off)
36
* occ file:scan [user] this will rescan the file cache for [user] or --all for all
37
** this doesn't work for samba shares with OC login credentials as OC has no easy capacity for caching credentials for this purpose. (currently being worked on)
38
* 
Go to top