External storage on OC Root directory

Hello all,

I would like to setup external storage on Root directory of OwnCloud.
Like this, I Can create a folder on Root directory of OwnCloud and get the folder directly on my remonte storage (i dont want any folder directly on /data/user).
I try to put / on folder name but if doesn`t work.

Do you have ans idea how to setup this?

Steps to reproduce

1.folder name = /

Server configuration

Operating system:
Snap qts 4.5
Web server:
Apache
Database:
Mariadb
PHP version:
7.4
ownCloud version:
10.5

This is an insane idea and nobody should want that.

Whatever you are trying to achieve, ownCloud is not the tool do it.

Hello,

Thanks for your reply.

I want to do that because I run OC on my Qnap and i have some privilège issue when I want to acces file between Qnap and OC.

For exemple if I put one file from Qnap GUI to OC folder, this file is not show on OC GUI.
Another exmple, if I want to delete a file from Qnap into the OC folder, I can’t.

Hey,

i have seen the following statement in the past:

ownCloud rule number 1: NEVER touch the ownCloud’s data folder (unless told otherwise). Consider it as a black box: you don’t know nor care about what’s in there.

Lost folders after changing there name

I think the recommended way is to set up the mount point inside the root, so you could have more than one mount point visible to the users. Maybe you can have a common location set for all the users via SMB and something a bit more private per user via SFTP in a different host.
You can set up the user quota to 0 so the users can’t upload files iside ownCloud. They can still upload files in the external storages as long as there is enough space there.

That would be the recommended way. Note that users can still create folders inside ownCloud even though they can’t upload anything there.

If you don’t want the users to create folders inside ownCloud, this isn’t supported. The not recommended way could be:

  1. Create the user with password
  2. Login with the user to create the required folders in the FS
  3. Remove FS write permission to the www-data / apache user in the <ocdata>/<userid>/files folder

Note that this isn’t recommended because there is no easy way to do this. Furthermore, if you want to delete the user, the “protected” folder will remain because ownCloud can’t remove it. This will likely cause confusion in the long run because ownCloud will tell you the user has been removed, but the files are still there.

1 Like