Can't add local external storage, option not available

external_storage
10

#1

Steps to reproduce

  1. install newest owncloud 10.0.1 (stable)
  2. enable external storage & smbclient
  3. Try to enable local storage in admin settings

Expected behaviour

I think there should be a way to add storage type "Local" but I can't select it.

Actual behaviour

See screenshot: I am missing the local store icon apparently?

Server configuration

Operating system:
Linux version 4.8.0-49-generic (buildd@lcy01-30) (gcc version 6.2.0 20161005 (Ubuntu 6.2.0-5ubuntu12) ) #52-Ubuntu SMP Thu Apr 20 09:38:39 UTC 2017

Web server:
Apache2

Database:
mysql

PHP version:
7.0.18

ownCloud version: (see ownCloud admin page)
10.0.1 (stable)

Updated from an older ownCloud or fresh install:
fresh

Where did you install ownCloud from:
owncloud.org

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:

List of activated apps:

Enabled:
  - comments: 0.3.0
  - configreport: 0.1.1
  - dav: 0.2.9
  - external: 1.2
  - federatedfilesharing: 0.3.0
  - federation: 0.1.0
  - files: 1.5.1
  - files_external: 0.7.0
  - files_pdfviewer: 0.8.2
  - files_sharing: 0.10.0
  - files_texteditor: 2.2
  - files_trashbin: 0.9.0
  - files_versions: 1.3.0
  - files_videoplayer: 0.9.8
  - firstrunwizard: 1.1
  - gallery: 16.0.2
  - market: 0.1.0
  - notifications: 0.3.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - templateeditor: 0.1
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - files_antivirus
  - theme-example
  - user_external

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no
yes

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
none


ownCloud X/10.0.x (known issues, faq and upgrade problems)
#2

I'm having the same issue.

Unfortunately I have no real solution available.

A dirty workaround which worked for me was to manually enter rows in the "external_config" and "external_mounts" tables, e.g. through these SQL statements:

INSERT INTO `oc_external_mounts` (`mount_id`, `mount_point`, `storage_backend`, `auth_backend`, `priority`, `type`) VALUES (2, '/Photos', 'local', 'null::null', 150, 1);

INSERT INTO `oc_external_config` (`config_id`, `mount_id`, `key`, `value`) VALUES (2, 2, 'datadir', '/mnt/exthd/someDirectory');

Make sure the "mount_id", "mount_point", config_id are unique, and that mount_id matches between the entries in the two tables.
Adapt the "value" in config to the physical location on disk, and the "mount_point" to the location where you want to mount the directdory in owncloud.
The share showed up then in the administration settings, and I could configure which users have access to it.

I'm absolutety not sure about any possible undesired side effects, so I will not take any responsibility for possible data loss, make sure to backup everything first!


#3

thank you that looks like it would help. can i add this in the console as well if i use those row values as parameters?


#4

This was disabled by default for security reasons. There should be a note in the release notes and we will ASAP update the documentation.


If on your system the ownCloud admin and the sysadmin are the same person you can just enable it.


#5

yes, this is my home nas server so i have no secutity concerns about this.

thanks


#6

Hi all,

Same issue with my fresh installation (oc 10.0.2 on Ubuntu 16.04LTS). I had to tweak the config.php file and add the "files_external_allow_local=true" flag to get the "Local" support back again. However, even when setting up an authorized local storage, the left dot still display a red square instead of a green disc.

How can I fix this?

Thanks in advance for any help!


#7

RandolphCarter
A dirty workaround which worked for me was to manually enter rows in the "external_config" and "external_mounts" tables, e.g. through these SQL statements:

idem on 10.0.3
It's better to use occ commands
in linux shell script

sudo -u $htuser $ocpath/occ app:enable files_external
sudo -u $htuser $ocpath/occ files_external:create Downloads \\OC\\Files\\Storage\\Local null::null
sudo -u $htuser $ocpath/occ files_external:config 1 datadir \/home\/$user\/downloads
sudo -u $htuser $ocpath/occ files_external:option 1 enable_sharing true
sudo -u $htuser $ocpath/occ files_external:applicable --add-user=$user 1
verify=$(sudo -u $htuser $ocpath/occ files_external:verify 1)
sudo -u $htuser $ocpath/occ files:scan --all

where
"$htuser" the Http user
"$ocpath" the direcory where installed owncloud
"Downloads" is the name of local directory displaied on owncloud
"$user" the owncloud user
"1" the key of exeternal storage which must be incremented for each addition
" \/home\/$user\/downloads" full path of local directory to add
echo $verify return 0 : ok or error value
scan files to display the new files


#8

I got it to work by adding this line to config.php:

'files_external_allow_create_new_local' => 'true',

Ref: https://doc.owncloud.org/server/10.0/admin_manual/configuration/files/external_storage/local.html