Problem to add local storage to owncloud

Hi all!

Steps to reproduce

  1. fresh owncloud 10.0.10 installation on QNAP NAS TS-877
  2. edit config.php to allow adding local storage as external
  3. add lokal directories as external storage

Expected behaviour

Adding and manipulation of local directories/files saved on server with owncloud.

Actual behaviour

Owncloud is not adding specific local directories as external storage. It’s possible to add / or /home and some other paths as read-only (no rights to add or change files - due to permission restrictions), but specific directories eg. /share/CACHEDEV1_DATA/WORK_Kunden_und_Projekt_Dokumente are not working.

Server configuration

Operating system: QNAP NAS with QTS 4.3.6

**Web server: Apache

**Database: MariaDB 5.5.57

**PHP version: 5.6.38

**ownCloud version: 10.0.0.10

**Updated from an older ownCloud or fresh install: fresh installation

Where did you install ownCloud from: QNAP NAS App store

**Signing status (ownCloud 9.0 and above): 10.0.0.10

The content of config/config.php:
/share/CACHEDEV1_DATA/.qpkg/owncloudv10/config/config.php

<?php
$CONFIG = array (
  'instanceid' => 'oc9ylgi936m2',
  'passwordsalt' => 'ejUfFNoObUSVQqidZuGFt3xIGYjJa3',
  'secret' => 'FeYu9gbQi4aoag3aNCJQHyTZqspkOzCBhqs8ztkStlJv5pB+',
  'trusted_domains' =>
  array (
    0 => '192.168.1.2:4490',
    1 => 'XX.XXXXXX.XXX:4490',
  ),
  'datadirectory' => '/var/www/html/data',
  'overwrite.cli.url' => 'http://192.168.1.2:4490',
  'dbtype' => 'mysql',
  'version' => '10.0.10.4',
  'dbname' => 'owncloudDB',
  'dbhost' => '192.168.1.2',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin2',
  'dbpassword' => 'gWSYhwEFBZfzqNNNaD6pv7MugVcmEw',
  'logtimezone' => 'UTC',
  'installed' => true,
  'files_external_allow_create_new_local' => true,
);

**Are you using external storage, if yes which one:
storage which should be added is located under:
/share/CACHEDEV1_DATA/WORK_Kunden_und_Projekt_Dokumente

**Are you using encryption: no

The installation of owncloud 10.0.10 was in general very easy and worked as expected. Struggling a little bit with SSL-installation but this is not important at the moment. After adding the line ‘files_external_allow_create_new_local’ => true to config.php it should be also possible to add local directories as external storage - option appears on admin page as expected. Now I want to add my local directories as external storage. It’s not possible to do this - don’t know why - is it a different path or some issue with permissions? with ssh login and search function, I found my local data under /share/CACHEDEV1_DATA/WORK_Kunden_und_Projekt_Dokumente but this path is not working in owncloud (see picture). I tried some other random paths for example / - this paths can be found and added as readonly and this directory seems to be different compared with the original file structure on the server.
I’m not very experienced with webserver setups and a little bit lost now, maybe somebody can help me.

Many thanks

Regards
Ralf

Access to those local folders are done by using the webserver’s user (usually www-data or apache). Make sure that user have enough permissions in the configured folders inside the local FS to do what you want.

2 Likes