How to make owncloud "reading" filesystem symlinks?

Firstly HI!
I'm new here so feel free to hate in case I didn't follow "something" :slight_smile:

Secondly - I doubt I can report this as bug or issue as nowhere found it could be supported, so this is more like "is it possible" and "request for help"
However up to 9.0.2 solution worked fine and this was:

Steps to reproduce
1. Make on a server filesystem directory [/my_data_dir] not owned by www-data (or other user used for apache/nginx) and fill up with data/files
2. Make this directory readable and "executable", as well as files inside, for www-data user [chmod -R 755 /my_data_dir]
3. Make a symlink to this directory in owncloud user home [ ln -s /my_data_dir data/VIPuser/files/my_data]
4. Try to scan it by occ and/or enter from web. You will be given message that this operation is not allowed and in log you will find that remote.php issues 403 on webdav.

Expected behaviour
To see contents of my_dir

Actual behaviour
HTTP 403

Server configuration
Operating system: Ubuntu 16 LTS
Web server: Apache
Database: MySQL
ownCloud version (see ownCloud admin page): 9.1.0.15
Updated from an older ownCloud or fresh install: 9.0.2

So, I've been using this way from version 8 and never had issue. It worked perfectly. Yesterday did upgrade to 9.1.0.15
(and applied changes for bugs
- https://github.com/owncloud/core/issues/25755
- https://github.com/owncloud/core/issues/25506
)
And it stopped working this way.
All "normal" functionality works but this one stopped.

So now the question is is it possible by configuration to make owncloud to act same as before. This is very important part of functionality as I will not put all of the data from /my_data_dir under owncloud. This directory is also accessible by other channels and "very very unlikely" I would want to change it to be fully owned by www-data as well. :slight_smile:
Any hints welcome...
Cheers
Px2

Hi,

you can't use symlinks within the datadir in 9.1:

https://doc.owncloud.org/server/9.1/admin_manual/release_notes.html#owncloud-does-not-follow-symlinks

As an alternative you can use the external storage app with the local storage backend:

https://doc.owncloud.org/server/9.1/admin_manual/configuration_files/external_storage_configuration_gui.html

https://doc.owncloud.org/server/9.1/admin_manual/configuration_files/external_storage/local.html

Thanks RealRancor!

This works for me. I used Local option from External storage.
One note - according to docs (https://doc.owncloud.org/server/9.1/admin_manual/configuration_files/external_storage/local.html) I should change ownership to www server user, however I'm not going to and I see this way works. I do not need to change there anything - just read access. I hope it will stay like that and new version won't suddenly start asking for write permissions.
Anyway - it works now. Thanks!

This also made me sad when I upgraded. Used several file system "mounts" from FreeNAS to reach my other file system instead and I think I'm good to go now.

I would feel better about this development decision if I knew it was done for security reasons.

It was most likely done for safety reasons to avoid that you're loosing your data. symlinks where never supported:

https://doc.owncloud.org/server/latest/admin_manual/release_notes.html#owncloud-does-not-follow-symlinks

and its now probably just a hard-fail as people ignored / didn't noticed the documentation above.

My problem is not on the server side, I've gotten the ownCloud data area mounted on my Samba file server...my problem is with Windows users who insist on using their Desktop as the primary location to store files that need to be on the ownCloud server. I've tried putting a "windows link" of their Desktop in their ownCloud folder but that just moves the .lnk file up there and doesn't point to any files found on their /users/username/Desktop to back them up.

I have also found this same behavior on my own Mint 17.3 desktop as well using ln -s where the simlink gets moved up to the ownCloud server but doesn't move anything found in that link.

Is there a way to say like rsync "Follow links" to backup those files too?

I forgot to mention that mounting the NAS location on my Mint 17.3 desktop in the ownCloud folder does work although on a windows system I'm not sure that's possible...

I understand that moving all the "Desktop" files to the ownCloud system and linking all those folders and files to the end users Desktop is a funky but workable solution, that is until they, the user, creates a new folder or file on their desktop and forget they should have created it in their ownCloud folder and link it to their desktop. Hey some of my users might not even be able to create a link even if I've shown them time and time again.

Users are losers is what my boss says...well he's one too! (Psst, don't tell him...)