Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public links in shared folders do not work #36386

Banho40 opened this issue Nov 7, 2019 · 7 comments · Fixed by #36393

Public links in shared folders do not work #36386

Banho40 opened this issue Nov 7, 2019 · 7 comments · Fixed by #36393


Copy link

Banho40 commented Nov 7, 2019

Hello, everybody,

I first posted my problem on owncloud.central. They advised me to post it here.

After updating Owncloud to 10.3.0 via the updater there is a problem with folders shared in Owncloud.
There are folders shared with the members of a group. The folders are accessible to all. But if a member of the group who is not the creator of the folder wants to share files or the folder via a public link, he gets the message:
“An error occurred while sending the mail. No email could be sent to the following recipients: Mail address”
Only the creator of the shared folder can share it in this way. This is the case for all users, as well as for newly created and shared folders. So it is a general problem.
With all own folders / files this problem does not exist, there the mails are sent.
I am grateful for every hint!

Steps to reproduce

  1. share a shared folder via public link

Expected behaviour

Email should be fired

Actual behaviour

"An error occurred while sending the mail. No email could be sent to the following recipients: Mail address"

Server configuration

Operating system:
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Web server:
$ apache2 -v
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2019-09-16T12:58:48
MariaDB [(none)]> select @@Version;
| 10.3.18-MariaDB-1:10.3.18+maria
bionic-log |
PHP version:
~$ php -v
PHP 7.2.24-0ubuntu0.18.04.1 (cli) (built: Oct 28 2019 12:07:07) ( NTS )
Zend Engine v3.2.0,
with Zend OPcache v7.2.24-0ubuntu0.18.04.1
ownCloud version: (see ownCloud admin page)
Updated from an older ownCloud or fresh install:
Update from 10.0.2 over updater
Where did you install ownCloud from:
owncloud zip packet
Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
paste the results into and puth the link here.

The content of config/config.php:
“system”: {
“instanceid”: “oc7pslajdbmf”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“theme”: “goebber”,
“trusted_domains”: [
“datadirectory”: “/var/www/owncloud/data”,
“overwrite.cli.url”: “”,
“dbtype”: “mysql”,
“version”: “”,
“dbname”: “owncloud”,
“dbhost”: “localhost”,
“dbtableprefix”: “oc_”,
“logtimezone”: “UTC”,
“apps_paths”: [
“path”: “/var/www/owncloud/apps”,
“url”: “/apps”,
“writable”: false
“path”: “/var/www/owncloud/apps-external”,
“url”: “/apps-external”,
“writable”: true
“installed”: true,
“memcache.local”: “\OC\Memcache\APCu”,
“memcache.locking”: “\OC\Memcache\Redis”,
“redis”: {
“host”: “localhost”,
“port”: 6379,
“timeout”: 0,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_smtpmode”: “smtp”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “25”,
“preview_libreoffice_path”: “/usr/bin/libreoffice”,
“enable_certificate_management”: true,
“allow_user_to_change_display_name”: “true”,
“loglevel”: 2,
“maintenance”: false

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.


If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

activity: 2.5.0
calendar: 1.6.3
comments: 0.3.0
configreport: 0.2.0
contacts: 1.5.5
dav: 0.5.0
encryption: 1.4.0
federatedfilesharing: 0.5.0
federation: 0.1.0
files: 1.5.2
files_antivirus: 0.15.1
files_external: 0.7.1
files_mediaviewer: 1.0.0
files_pdfviewer: 0.11.0
files_sharing: 0.12.0
files_texteditor: 2.3.0
files_trashbin: 0.9.1
files_versions: 1.3.0
files_videoplayer: 0.10.1
firstrunwizard: 1.2.0
gallery: 16.1.1
market: 0.5.0
notifications: 0.5.0
provisioning_api: 0.5.0
systemtags: 0.3.0
templateeditor: 0.4.0
updatenotification: 0.2.1
user_ldap: 0.13.0
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption: yes/no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

| Configuration | s01 |
| hasMemberOfFilterSupport | 1 |
| hasPagedResultSupport | |
| homeFolderNamingRule | |
| lastJpegPhotoLookup | 0 |
| ldapAgentName | CN=Service,OU=xxx,OU=Organisation,DC=xxx,DC=xxx |
| ldapAgentPassword | *** |
| ldapAttributesForGroupSearch | |
| ldapAttributesForUserSearch | |
| ldapBackupHost | |
| ldapBackupPort | 389 |
| ldapBase | DC=xxx,DC=xxx |
| ldapBaseGroups | DC=xxx,DC=xxx |
| ldapBaseUsers | DC=xxx,DC=xxx |
| ldapCacheTTL | 600 |
| ldapConfigurationActive | 1 |
| ldapDynamicGroupMemberURL | |
| ldapEmailAttribute | mail |
| ldapExperiencedAdmin | 0 |
| ldapExpertUUIDGroupAttr | |
| ldapExpertUUIDUserAttr | objectguid |
| ldapExpertUsernameAttr | sAMAccountName |
| ldapGroupDisplayName | cn |
| ldapGroupFilter | |
| ldapGroupFilterGroups | |
| ldapGroupFilterMode | 0 |
| ldapGroupFilterObjectclass | |
| ldapGroupMemberAssocAttr | uniqueMember |
| ldapHost | |
| ldapIgnoreNamingRules | |
| ldapLoginFilter | (&(&(|(objectclass=person))(|(|(memberof=CN=Owncloud,OU=Arbeitsgruppen,OU=Gruppen,OU=Organisation,DC=xxx,DC=xxx)(primaryGroupID=9863))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))(|(displayName=%uid)(mail=%uid)))) |
| ldapLoginFilterAttributes | displayName;mail |
| ldapLoginFilterEmail | 1 |
| ldapLoginFilterMode | 0 |
| ldapLoginFilterUsername | 1 |
| ldapNestedGroups | 0 |
| ldapOverrideMainServer | |
| ldapPagingSize | 500 |
| ldapPort | 389 |
| ldapQuotaAttribute | |
| ldapQuotaDefault | |
| ldapTLS | 0 |
| ldapUserDisplayName | displayName |
| ldapUserDisplayName2 | |
| ldapUserFilter | (&(|(objectclass=person))(|(|(memberof=CN=Owncloud,OU=Arbeitsgruppen,OU=Gruppen,OU=Organisation,DC=xxx,DC=xxx)(primaryGroupID=9863)))) |
| ldapUserFilterGroups | Owncloud |
| ldapUserFilterMode | 0 |
| ldapUserFilterObjectclass | person |
| ldapUserName | samaccountname |
| ldapUuidGroupAttribute | auto |
| ldapUuidUserAttribute | auto |
| turnOffCertCheck | 0 |
| useMemberOfToDetectMembership | 1 |

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';

Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Operating system:


Web server error log

Insert your webserver log here

[Wed Nov 06 00:09:04.965553 2019] [ssl:warn] [pid 1324] AH01909: server certificate does NOT include an ID which matches the server name
[Wed Nov 06 00:09:05.091619 2019] [ssl:warn] [pid 1324] AH01909: server certificate does NOT include an ID which matches the server name
[Wed Nov 06 00:09:05.092028 2019] [ssl:warn] [pid 1324] AH01909: server certificate does NOT include an ID which matches the server name
[Wed Nov 06 00:09:05.092399 2019] [ssl:warn] [pid 1324] AH01909: server certificate does NOT include an ID which matches the server name
[Wed Nov 06 00:09:05.092562 2019] [mpm_prefork:notice] [pid 1324] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 configured – resuming normal operations
[Wed Nov 06 00:09:05.092570 2019] [core:notice] [pid 1324] AH00094: Command line: ‘/usr/sbin/apache2’
[Wed Nov 06 13:41:15.650010 2019] [authz_core:error] [pid 94690] [client] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Wed Nov 06 13:59:21.517434 2019] [authz_core:error] [pid 94679] [client] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Wed Nov 06 15:02:53.462156 2019] [authz_core:error] [pid 94679] [client] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt
[Wed Nov 06 15:15:04.735398 2019] [authz_core:error] [pid 95388] [client] AH01630: client denied by server configuration: /var/www/owncloud/data/htaccesstest.txt

ownCloud log (data/owncloud.log)

Insert your ownCloud log here

the log is too big, here are excerpts of a user it doesn’t work for

{“reqId”:“XbhQtE6pCzCqHTCh2EZeQQAAAAU”,“level”:3,“time”:“2019-10-29T14:46:12+00:00”,“remoteAddr”:“”,“user”:“xxx”,“app”:“PHP”,“method”:“GET”,“url”:"/index.php/apps/files/",“message”:“include(layout.noscript.warning.php): failed to open stream: No such file or directory at /var/www/owncloud/themes/xxx/core/templates/layout.user.php#35”}
{“reqId”:“XbhQtE6pCzCqHTCh2EZeQQAAAAU”,“level”:3,“time”:“2019-10-29T14:46:12+00:00”,“remoteAddr”:“”,“user”:“xxx”,“app”:“PHP”,“method”:“GET”,“url”:"/index.php/apps/files/",“message”:“include(): Failed opening ‘layout.noscript.warning.php’ for inclusion (include_path=’/var/www/owncloud/apps:/var/www/owncloud/apps-external’) at /var/www/owncloud/themes/xxx/core/templates/layout.user.php#35”}
{“reqId”:“XbhQtE6pCzCqHTCh2EZeQQAAAAU”,“level”:3,“time”:“2019-10-29T14:46:12+00:00”,“remoteAddr”:“”,“user”:“xxx”,“app”:“no app in context”,“method”:“GET”,“url”:"/index.php/apps/files/",“message”:“Exception: {“Exception”:“Symfony\Component\Routing\Exception\RouteNotFoundException”,“Message”:“Unable to generate a URL for the named route \“settings.AppSettings.viewApps\” as such route does not exist.”,“Code”:0,“Trace”:”#0 /var/www/owncloud/lib/private/Route/Router.php(382): Symfony\Component\Routing\Generator\UrlGenerator->generate(‘settings.AppSet…’, Array, 1)\n#1 /var/www/owncloud/lib/private/Route/CachingRouter.php(60): OC\Route\Router->generate(‘settings.AppSet…’, Array, false)\n#2 /var/www/owncloud/lib/private/URLGenerator.php(86): OC\Route\CachingRouter->generate(‘settings.AppSet…’, Array)\n#3 /var/www/owncloud/themes/xxx/core/templates/layout.user.php(129): OC\URLGenerator->linkToRoute(‘settings.AppSet…’)\n#4 /var/www/owncloud/lib/private/Template/Base.php(219): include(’/var/www/ownclo…’)\n#5 /var/www/owncloud/lib/private/Template/Base.php(194): OC\Template\Base->load(’/var/www/ownclo…’, NULL)\n#6 /var/www/owncloud/lib/private/legacy/template.php(236): OC\Template\Base->fetchPage(NULL)\n#7 /var/www/owncloud/lib/private/legacy/template.php(258): OC_Template->fetchPage()\n#8 /var/www/owncloud/lib/public/AppFramework/Http/TemplateResponse.php(149): OC_Template->fetchPage()\n#9 /var/www/owncloud/lib/private/AppFramework/Http/Dispatcher.php(108): OCP\AppFramework\Http\TemplateResponse->render()\n#10 /var/www/owncloud/lib/private/AppFramework/App.php(100): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Files\Controller\ViewController), ‘index’)\n#11 /var/www/owncloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\AppFramework\App::main(‘ViewController’, ‘index’, Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#12 /var/www/owncloud/lib/private/Route/Router.php(342): OC\AppFramework\Routing\RouteActionHandler->__invoke(Array)\n#13 /var/www/owncloud/lib/base.php(920): OC\Route\Router->match(’/apps/files/’)\n#14 /var/www/owncloud/index.php(54): OC::handleRequest()\n#15 {main}",“File”:"/var/www/owncloud/lib/composer/symfony/routing/Generator/UrlGenerator.php",“Line”:113}"}
{“reqId”:“XbhQtE6pCzCqHTCh2EZeQQAAAAU”,“level”:3,“time”:“2019-10-29T14:46:12+00:00”,“remoteAddr”:“”,“user”:“xxx”,“app”:“PHP”,“method”:“GET”,“url”:"/index.php/apps/files/",“message”:"Undefined index: appsmanagement_active at /var/www/owncloud/themes/xxx

Browser log

Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log 
c) ...
Copy link

I confirmed this.
There are acceptance tests for creating public links and sending email at the same time, and for creating public links from received shares. But there is not a scenario for creating a public link from a received share and sending email :(

I have a test scenario that passes on 10.2.1 and fails on 10.3.0. I will make a PR to add the test scenario.

Copy link

Added QA-team label because we need to make a test scenario(s) that covers this combination.

Copy link

git bissect tells me that the problem was introduced in c84d530

c84d530419a1185e97c511ff0d30176f08667989 is the first bad commit
commit c84d530419a1185e97c511ff0d30176f08667989
Author: karakayasemi <>
Date:   Sat Aug 17 22:54:34 2019 +0300

    add ocs api for public link share email notification

I guess that that it does not correctly handle the case when preparing an email referring to a folder that is owned by a different user to the one that is creating the new public link.

Copy link

Removed QA-team label and added to sprint backlog. This now needs a developer to investigate a fix.

Copy link

karakayasemi commented Nov 9, 2019

A fix PR opened in here: #36393

Copy link

Fixed with #36393

Copy link

Banho40 commented Nov 11, 2019

Thanks guys for your work. Me and my users can also confirm that this Fix works.
best regards Andre

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

Successfully merging a pull request may close this issue.

3 participants