Owncloud

From Alessandro's Wiki

Installation

I avoid package manager installations due to avoidable bad experiences.

unpacking the source in your /var/www/cloud or deploying a docker image, are surely better solutions for long term stability

https://www.howtoforge.com/how-to-install-owncloud-on-debian-12/

cli

sudo -u www-data ./occ background:queue:delete 12

Job has been deleted.

$ php occ app:enable encryption
$ php occ encryption:status
  - enabled: true
  - defaultModule: OC_DEFAULT_MODULE
$ php occ encryption:decrypt-all
$encryption:list-modules
  - OC_DEFAULT_MODULE: Default encryption module [default*]
$ php occ encryption:show-key-storage-root
Current key storage root:  default storage location (data/)

DAV

srv:# cadaver https://example.com/cloud/remote.php/webdav/
Authentication required for ownCloud on server `example.com':
Username: abcd
Password:
dav:/cloud/remote.php/webdav/> ls
...

Troubleshooting

Encription errors:

OwnCloud uses a legacy ssl module, on recent distributions, this is disabled by default:https://doc.owncloud.com/server/10.14/admin_manual/installation/manual_installation/manual_installation_prerequisites.html#openssl-version

multikeydecrypt with share key failed:error: 0308010C:digital envelope routines::unsupported

-> Need to modify /etc/ssl/openssl.cnf to enable legacy support:

[openssl_init]
providers = provider_sect

# List of providers to load
[provider_sect]
default = default_sect
legacy = legacy_sect

[default_sect]
activate = 1
[legacy_sect]
activate = 1

DAV client connection problem with php-fpm

  • fix the DAV client connection problem with php-fpm
OPTIONS /index.php/login HTTP/1.1" 405
owncloud PROPFIND /remote.php/webdav/ HTTP/1.1" 401
  • setting the following in the VH solved the problem
 <IfModule setenvif_module>
   SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
 </IfModule>

ModSecurity

  • moreover, if you're using ModSecurity, it will block some weird encoded files:
[id "200002"] [msg "Failed to parse request body."]
  • /etc/modsecurity/modsecurity.conf
SecRule REQUEST_URI /PATH/GIVING/ERROR "phase:1,id:12346,nolog,chain"
  SecRule REQUEST_BODY_LENGTH "@eq 0" "ctl:requestBodyAccess=off"