Share folder by link fails when folder is in external storage and storage is restricted to a user group

Steps to reproduce
1. Create new user group Lab_group. Add your own user account, and some other users as members of this group.
2. Create new external storage instance, type=local, call it Lab_ext_storage in OC > Admin.
3. Add Lab_group in the section available for for new external storage. This restricts access of storage to the group. [THIS IS THE CRITICAL STEP FOR REPRODUCING THE BUG]
4. Open advanced settings for Lab_ext_storage (gear icon) and check enable sharing.
5. Go to OC > Files. Enter Lab_ext_storage folder, add some sample files there.
6. Go to OC > Files. Open details section for Lab_ext_storage (... button).
7. In Lab_ext_storage > details > sharing, check 'share link', check 'password protect' and provide a password. Copy the share link.
8. Open a new incognito browser (or different browser app), paste the share link, and open authentication page. Enter password created in step 7.

Expected behaviour

The shared folder (within the external storage) should open for the anonymous user.

Actual behaviour

Error message: File not found. The specified document has not been found on the server.

Log message: {"reqId":"BrCBE\/JJw2akPaK+IMJm","remoteAddr":"132.206.xxx.xx","app":"filesystem","message":"Storage wrapper 'sharePermissions' was not registered via the 'OC_Filesystem - preSetup' hook which could cause potential problems.","level":2,"time":"2017-01-10T16:41:17+00:00","method":"PROPFIND","url":"\/public.php\/webdav\/","user":"--"}

Screen shot:

Server configuration
Operating system: Ubuntu 14.04.5 LTS (trusty)
Web server: Apache
Database: MySQL
PHP version: PHP 5.5.9
ownCloud version (see ownCloud admin page): 9.1.2
Updated from an older ownCloud or fresh install: fresh install
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

External storage: local storage, local folder mounts NFS drive within local network

ownCloud log (data/owncloud.log)

{"reqId":"BrCBE\/JJw2akPaK+IMJm","remoteAddr":"132.206.xxx.xx","app":"filesystem","message":"Storage wrapper 'sharePermissions' was not registered via the 'OC_Filesystem - preSetup' hook which could cause potential problems.","level":2,"time":"2017-01-10T16:41:17+00:00","method":"PROPFIND","url":"\/public.php\/webdav\/","user":"--"}

Integrity status for oC9+

No errors have been found.

Cross-posting

This issue is caused by a bug in a 3rdparty app: https://github.com/fcturner/sharerenamer/issues/13

I think thats one of the main reasons why the documentation at https://doc.owncloud.org/server/latest/admin_manual/issues/general_troubleshooting.html#disable-3rdparty-non-shipped-apps is explaining as a very first start to disable 3rdparty apps when having any issues.

1 Like

Hi @fcturner, just tagging you on this post since it relates to your awesome app that works perfectly, except for this one tiny bug.

I have found a simple workaround to this bug.
Instead of using the rename share link on the root of the external storage, just create a new directory inside the external storage, create the share link here, and use the rename feature. This let's me use a friendlier URL for sharing, which was the goal.

1 Like