Internal Server Error after changing data directory

Steps to reproduce

1.rsync data folder
2.apply new permissions
3.change config.php

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:
Centos 7
Web server:
Apache/2.4.6
Database:
Ver 15.1 Distrib 5.5.60-MariaDB
PHP version:

PHP 7.2.19

ownCloud version: (see ownCloud admin page)
10.0.10.4
Updated from an older ownCloud or fresh install:
Fresh
Where did you install ownCloud from:
owncloud
Signing status (ownCloud 9.0 and above):

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => "***REMOVED SENSITIVE VALUE***
  'passwordsalt' => '"***REMOVED SENSITIVE VALUE***
  'secret' => '"***REMOVED SENSITIVE VALUE***
  'trusted_domains' => 
  array (
    0 => '192.168.102.13',
 ),
  'datadirectory' => '/data1',
  'overwrite.cli.url' => "***REMOVED SENSITIVE VALUE***
  'dbtype' => 'mysql',
  'version' => '10.0.10.4',
  'dbname' => 'owncloud10db',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => "***REMOVED SENSITIVE VALUE***
  'dbpassword' => "***REMOVED SENSITIVE VALUE***
  'logtimezone' => 'UTC',
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'installed' => true,
  'theme' => 'Pl',
  'ldapIgnoreNamingRules' => false,
  'preview_libreoffice_path' => '/usr/bin/soffice',
  'loglevel' => 0,
  'maintenance' => false,
  'trashbin_retention_obligation' => 'auto',
  'htaccess.RewriteBase' => '/',
  'updatechecker' => false,
  'log_rotate_size' => 128849018880,
  'updater.secret' => "***REMOVED SENSITIVE VALUE***

);

Hi,

please fill out the template.

  1. have you read our documentation regarding data directory changes?

https://doc.owncloud.com/server/admin_manual/maintenance/manually-moving-data-folders.html

  1. if you install a fresh ownCloud server - why 10.0.10 and not the current 10.5.0?
2 Likes

Hi Dmitry,

Yes I have followed the instructions. (1)

My Owncloud server was installed fresh but the disk has reached 2TB and cannot extend it more since it’s a dos. I have created a new GPT partition mounted /data1 and followed the procedures.

Matthew,

please provide your owncloud.log, there the exceptions are logged. This is the only way we can find out, what is causing the internal server error.

(I assume the www user has got read/write permissions for the new data directory)

1 Like

Hi cortho,

Yes i have tried to go through the logs however the log file owncloud.log is not updating since I have changed the datadirectory from config.php. The log level is set to 0 (Debug)

Thanks,
Matt

Check the apache error logs

1 Like

Since you are using centos this could be an SELinux issue as well. If you are using SELinux a simple chown/chmod for the www user is not sufficient, some further steps are required:

Have a look at https://doc.owncloud.com/server/10.5/admin_manual/installation/selinux_configuration.html#preparation

In your case you would have to apply this to your /data1 directory.

2 Likes

Hi cotho,

You saved my day. I have applied the referred commands but the ones in your link are different and it worked. I have noticed the owncloud.log file hasn’t updated since but looks everything is fine. Thank you

Regards,
Matt

2 Likes