Hi cortho,
Yes, I’m using PHP-FPM. The server is running Oracle Linux 7.9 (a Red Hat Enterprise Linux clone like CentOS).
So I followed your advice, and here’s what I got.
# sudo -u apache touch /var/www/slackbox-owncloud/html/data/microlinux/files/touchtest.txt
# ls -l /var/www/slackbox-owncloud/html/data/microlinux/files/
total 4908
drwxr-x---. 2 apache apache 4096 Aug 22 2019 Documents
-rw-r-----. 1 apache apache 5011365 Aug 22 2019 ownCloud Manual.pdf
drwxr-x---. 2 apache apache 4096 Aug 22 2019 Photos
drwxr-x---. 2 apache apache 4096 Feb 14 15:18 Test
-rw-r--r--. 1 apache apache 0 Feb 16 06:52 touchtest.txt
Here’s the virtual host configuration:
# cat /etc/httpd/conf.d/10-cloud.slackbox.fr-ssl.conf
# /etc/httpd/conf.d/10-cloud.slackbox.fr-ssl.conf
# http://cloud.slackbox.fr -> https://cloud.slackbox.fr
<VirtualHost *:80>
ServerName cloud.slackbox.fr
Redirect / https://cloud.slackbox.fr
</VirtualHost>
# https://cloud.slackbox.fr
<VirtualHost _default_:443>
ServerAdmin info@microlinux.fr
DocumentRoot "/var/www/slackbox-owncloud/html"
<Directory "/var/www/slackbox-owncloud/html">
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
ServerName cloud.slackbox.fr:443
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/sd-155842.dedibox.fr/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/sd-155842.dedibox.fr/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/sd-155842.dedibox.fr/fullchain.pem
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
ErrorLog logs/cloud.slackbox.fr-error_log
CustomLog logs/cloud.slackbox.fr-access_log common
</VirtualHost>
For setting file permissions, I used the script from the OwnCloud documentation:
# ls -l /var/www/slackbox-owncloud/
total 4
drwxr-x---. 14 microlinux apache 4096 May 8 2020 html
[root@sd-155842:~] # ls -l /var/www/slackbox-owncloud/html
total 376
drwxr-x---. 22 apache apache 4096 Apr 15 2020 apps
drwxr-x---. 3 apache apache 4096 May 8 2020 apps-external
-rw-r-----. 1 microlinux apache 8859 Apr 15 2020 AUTHORS
-rw-r-----. 1 microlinux apache 200376 Apr 15 2020 CHANGELOG.md
drwxr-x---. 2 apache apache 4096 Feb 14 18:17 config
-rw-r-----. 1 microlinux apache 4624 Apr 15 2020 console.php
-rw-r-----. 1 microlinux apache 34520 Apr 15 2020 COPYING
drwxr-x---. 16 microlinux apache 4096 Apr 15 2020 core
-rw-r-----. 1 microlinux apache 1717 Apr 15 2020 cron.php
drwxr-x---. 7 apache apache 4096 Feb 14 15:50 data
-rw-r-----. 1 microlinux apache 31204 Apr 15 2020 db_structure.xml
-rw-r-----. 1 microlinux apache 179 Apr 15 2020 index.html
-rw-r-----. 1 microlinux apache 3524 Apr 15 2020 index.php
drwxr-x---. 6 microlinux apache 4096 Apr 15 2020 lib
-rwxr-x--x. 1 microlinux apache 283 Apr 15 2020 occ
drwxr-x---. 2 microlinux apache 4096 Apr 15 2020 ocm-provider
drwxr-x---. 2 microlinux apache 4096 Apr 15 2020 ocs
drwxr-x---. 2 microlinux apache 4096 Apr 15 2020 ocs-provider
-rw-r-----. 1 microlinux apache 3135 Apr 15 2020 public.php
-rw-r-----. 1 microlinux apache 2157 Apr 15 2020 README.md
-rw-r-----. 1 microlinux apache 5618 Apr 15 2020 remote.php
drwxr-x---. 4 microlinux apache 4096 Apr 15 2020 resources
-rw-r-----. 1 microlinux apache 26 Apr 15 2020 robots.txt
drwxr-x---. 12 microlinux apache 4096 Apr 15 2020 settings
-rw-r-----. 1 microlinux apache 2231 Apr 15 2020 status.php
drwxr-x---. 6 apache apache 4096 Nov 14 2019 updater
-rw-r-----. 1 microlinux apache 280 Apr 15 2020 version.php
OwnCloud has been running fine for years on half a dozen servers, without a hiccup. But this is the first time I actually try to clone an installation to a different server with a different domain. I’m doing this for testing purposes mainly.
Uh oh and it looks like I’m on to something because I just took a peek in owncloud.log, and it’s filled with the following:
{"reqId":"fa7a65b0-37b0-411e-972d-2d167e7f1083","level":3,"time":"2021-02-14T20:24:17+00:00","remoteAddr":"88.161.127
.222","user":"microlinux","app":"no app in context","method":"PROPFIND","url":"\/remote.php\/dav\/files\/microlinux\/
","message":"User backend OC\\User\\Database is returning home: \/var\/www\/slackbox-owncloud\/html\/data\/microlinux
for user: microlinux which differs from existing value: \/var\/www\/aujardin-owncloud\/html\/data\/microlinux"}
{"reqId":"85558610-1609-4a46-8112-6978dae5b804","level":3,"time":"2021-02-14T20:29:17+00:00","remoteAddr":"88.161.127
.222","user":"microlinux","app":"no app in context","method":"PROPFIND","url":"\/remote.php\/dav\/files\/microlinux\/
","message":"User backend OC\\User\\Database is returning home: \/var\/www\/slackbox-owncloud\/html\/data\/microlinux
for user: microlinux which differs from existing value: \/var\/www\/aujardin-owncloud\/html\/data\/microlinux"}
Here’s what my config.php looks like (except the password):
<?php
$CONFIG = array (
'instanceid' => 'ocghcg4ouqo7',
'passwordsalt' => '9bOeyjIkRnwuEeR1YsvLLRLCx7zlr5',
'secret' => '9xlfua1f3sprpFqq7wdyUkJmC6n267OYkvz89pY00y60fpPQ',
'trusted_domains' =>
array (
0 => 'cloud.slackbox.fr',
),
'datadirectory' => '/var/www/slackbox-owncloud/html/data',
'overwrite.cli.url' => 'https://cloud.slackbox.fr',
'dbtype' => 'mysql',
'version' => '10.4.1.3',
'dbname' => 'slackbox-owncloud',
'dbhost' => 'localhost:3306',
'dbtableprefix' => 'oc_',
'dbuser' => 'slackboxuser',
'dbpassword' => 'my_db_password_here',
'logtimezone' => 'UTC',
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/slackbox-owncloud/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/slackbox-owncloud/html/apps-external',
'url' => '/apps-external',
'writable' => true,
),
),
'installed' => true,
'has_rebuilt_cache' => true,
'maintenance' => false,
'loglevel' => 2,
);
I have a vague intuition this has something to do with this:
'memcache.local' => '\\OC\\Memcache\\APCu',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
Any suggestions ?
Cheers from the sunny South of France,
Niki