[SOLVED] Permissions on external local storage

,

I’m facing a problem when adding a folder as an external local storage. The problem is the same as here and here where a red square and message pops up. The message is this one

An error occurred while adding the external storage, please check the logs or contact the administrator

and if click the red square

An error occurred while loading external mount point: Local

neither did this solution help (The same literal question was asked on this forum, but can’t find it)

Steps to reproduce

  1. Create a folder, chown it to www-data (both user and group) (also tried www-data:root with the same result)
  2. Enable local mount in config.php
  3. Add it to external local storage in admin settings

Expected behaviour

The mount should be added

Actual behaviour

The mount is not added, rather, an error message is thrown

Server configuration

Operating system: Ubuntu 20.04

Web server:

Database: webhippie/mariadb:latest-arm64

PHP version:

ownCloud version: owncloud/server:10.9.1-arm64v8 (docker image)

Updated from an older ownCloud or fresh install: Fresh (docker)

Where did you install ownCloud from: docker-compose from official docker hub

Signing status (ownCloud 9.0 and above):

No errors have been found.

The content of config/config.php:

List of activated apps:

In paste

Are you using external storage, if yes which one: None, trying to use local

Are you using encryption: no

Are you using an external user-backend, if yes which one: None

Client configuration

Browser:

Operating system:

Logs

Web server error log

Which one is this for a Docker installation?

ownCloud log (data/owncloud.log)

{"reqId":"hCTfnD9sOBBGjMLN0dOG","level":0,"time":"2022-05-01T15:43:20+00:00","remoteAddr":"172.19.0.2","user":"admin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/apps\/files_external\/globalstorages\/4?testOnly=true","message":"token a9744a7b73e4f9305c7b135ebbdd622897960fe5f85c1dd3cf678fcbffe976f89c4f0f94ae6f0311401cd825a396f90e74ec1858ca7f50eb4412d2390fe1a52f with token id 2427 found, validating"}
{"reqId":"hCTfnD9sOBBGjMLN0dOG","level":0,"time":"2022-05-01T15:43:20+00:00","remoteAddr":"172.19.0.2","user":"admin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/apps\/files_external\/globalstorages\/4?testOnly=true","message":"token a9744a7b73e4f9305c7b135ebbdd622897960fe5f85c1dd3cf678fcbffe976f89c4f0f94ae6f0311401cd825a396f90e74ec1858ca7f50eb4412d2390fe1a52f with token id 2427 found, validating"}
{"reqId":"hCTfnD9sOBBGjMLN0dOG","level":0,"time":"2022-05-01T15:43:20+00:00","remoteAddr":"172.19.0.2","user":"admin","app":"OC\\User\\Session::validateToken","method":"GET","url":"\/apps\/files_external\/globalstorages\/4?testOnly=true","message":"token a9744a7b73e4f9305c7b135ebbdd622897960fe5f85c1dd3cf678fcbffe976f89c4f0f94ae6f0311401cd825a396f90e74ec1858ca7f50eb4412d2390fe1a52f with token id 2427 found, validating"}
{"reqId":"hCTfnD9sOBBGjMLN0dOG","level":3,"time":"2022-05-01T15:43:20+00:00","remoteAddr":"172.19.0.2","user":"admin","app":"PHP","method":"GET","url":"\/apps\/files_external\/globalstorages\/4?testOnly=true","message":"stat(): stat failed for REDACTED_FOLDER at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Local.php#135"}

Browser log

Nothing relevant

I’ll reply here because I found a solution by reading another post (this one). The problem is that I was giving a local path (local to the machine) and since my owncloud instance is running in Docker, it can’t see the machine’s filesystem, so I successfully did the following:

  1. Add the folder I want to use as external storage as a volume mount on the owncloud’s docker-compose file
  2. Use the mounted path as the argument for the Local storage

Maybe this sounds dumb or obvious but posting here will probably help a desperate soul like me