Owncloud cli cheatsheet » History » Revision 4
Revision 3 (Jessie Lee, 03/16/2016 01:47 PM) → Revision 4/14 (Jessie Lee, 03/16/2016 01:47 PM)
{{lastupdated_at}} by {{lastupdated_by}} {{>toc}} h1. Owncloud cli cheatsheet h2. Architecture * Owncloud by default is installed to /var/www/owncloud * The apache conf file is in /etc/apache2/conf-available/owncloud.conf ** by default this redirects any http[s[://[url]/owncloud to the owncloud directory ** I often change this to redirect / to owncloud if on subdomain or office fileserver * owncloud config file is in /var/www/owncloud/config/config.php ** note: if setting changes in the config file do not take, check the permissions for this file * the owncloud directory also has a detailed .htaccess file that is vital to the security of owncloud * The data directory can be found in the config file and is also the location of the owncloud.log file ** the data directory can and at office servers is often supplemented or replaced by local storage or SMB * the backend database is mysql which is used by default for everything. ** some larger installs (ex. NDWA) use redis instead of mysql for file locking. * caching is performed by memcached or redis h2. OCC Occ is the cli command tool for owncloud. Through this tool most user/file/maintenance operations can be performed. detailed instructions can be found here https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html key notes/favorite commands: * Occ must be run as the www-data user! ** 8.0+ should no longer even allow running as root but if that happens there might be a permission mess to deal with! ** always use sudo -u www-data php occ (I have aliased this to occ) * *occ upgrade* occ upgrade is needed for any major or minor release of owncloud! ** this will do a database upgrade test and then perform the upgrade ** for larger installs, this could take some time so only perform this during off hours. * *occ occ maintenance:mode --off/--on* --off/--on this will gracefully close connections and turn on maintenance mode (or off) * *occ occ file:scan [user]* [user] this will rescan the file cache for [user] or --all for all ** 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) *Go to top