Server: Shared folder not shown to new user when shared for group

Created on 17 Feb 2020  Â·  14Comments  Â·  Source: nextcloud/server

Steps to reproduce

  1. Create new usergroup and add users
  2. share folder for group - all existing users have access.
  3. create new user and add to existing group
  4. shared folder is not shown to new user

Expected behaviour

The user added to a group shoult have access to the folder.

Actual behaviour

The folder is not shown to the new user.

Server configuration

Operating system:
Ubuntu 18.04.3 LTS
Web server:
Apache
Database:
sqlite
PHP version:
7.3.14
Nextcloud version: (see Nextcloud admin page)
18.0.1
Updated from an older Nextcloud/ownCloud or fresh install:
fresh install
Where did you install Nextcloud from:
Download from nextcloud.com

List of activated apps:


  • accessibility: 1.4.0
  • activity: 2.11.0
  • bruteforcesettings: 1.5.0
  • calendar: 2.0.1
  • cloud_federation_api: 1.1.0
  • comments: 1.8.0
  • contacts: 3.1.8
  • dav: 1.14.0
  • deck: 0.8.0
  • documentserver_community: 0.1.5
  • federatedfilesharing: 1.8.0
  • federation: 1.8.0
  • files: 1.13.1
  • files_pdfviewer: 1.7.0
  • files_rightclick: 0.15.2
  • files_sharing: 1.10.1
  • files_trashbin: 1.8.0
  • files_versions: 1.11.0
  • files_videoplayer: 1.7.0
  • firstrunwizard: 2.7.0
  • logreader: 2.3.0
  • lookup_server_connector: 1.6.0
  • mail: 1.1.2
  • nextcloud_announcements: 1.7.0
  • notifications: 2.6.0
  • oauth2: 1.6.0
  • onlyoffice: 4.1.4
  • password_policy: 1.8.0
  • photos: 1.0.0
  • privacy: 1.2.0
  • provisioning_api: 1.8.0
  • recommendations: 0.6.0
  • serverinfo: 1.8.0
  • settings: 1.0.0
  • sharebymail: 1.8.0
  • spreed: 8.0.4
  • support: 1.1.0
  • survey_client: 1.6.0
  • systemtags: 1.8.0
  • talk_simple_poll: 1.1.0
  • text: 2.0.0
  • theming: 1.9.0
  • twofactor_backupcodes: 1.7.0
  • updatenotification: 1.8.0
  • viewer: 1.2.0
  • workflowengine: 2.0.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_ldap

Nextcloud configuration:


Config report

{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"testcloud.chmx.de"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "sqlite3",
"version": "18.0.1.3",
"overwrite.cli.url": "https:\/\/testcloud.chmx.de",
"installed": true,
"maintenance": false
},
"apps": {
"accessibility": {
"installed_version": "1.4.0",
"types": "",
"enabled": "yes"
},
"activity": {
"installed_version": "2.11.0",
"types": "filesystem",
"enabled": "yes"
},
"backgroundjob": {
"lastjob": "28"
},
"bruteforcesettings": {
"installed_version": "1.5.0",
"enabled": "yes",
"types": ""
},
"calendar": {
"installed_version": "2.0.1",
"enabled": "yes",
"types": ""
},
"cloud_federation_api": {
"installed_version": "1.1.0",
"types": "filesystem",
"enabled": "yes"
},
"comments": {
"installed_version": "1.8.0",
"types": "logging",
"enabled": "yes"
},
"contacts": {
"installed_version": "3.1.8",
"enabled": "yes",
"types": ""
},
"core": {
"installedat": "1581932976.0366",
"lastupdatedat": "1581947376",
"vendor": "nextcloud",
"public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
"public_files": "files_sharing\/public.php",
"installed.bundles": "[\"CoreBundle\"]",
"oc.integritycheck.checker": "[]",
"theming.variables": "b92d206521717ac032f8aa58d3c7ff2f",
"lastcron": "1581947465",
"enterpriseLogoChecked": "yes",
"lastupdateResult": "[]"
},
"dav": {
"installed_version": "1.14.0",
"types": "filesystem",
"enabled": "yes",
"regeneratedBirthdayCalendarsForYearFix": "yes",
"buildCalendarSearchIndex": "yes",
"buildCalendarReminderIndex": "yes"
},
"deck": {
"installed_version": "0.8.0",
"enabled": "yes",
"types": "dav"
},
"documentserver_community": {
"installed_version": "0.1.5",
"enabled": "yes",
"types": "filesystem"
},
"federatedfilesharing": {
"installed_version": "1.8.0",
"types": "",
"enabled": "yes"
},
"federation": {
"installed_version": "1.8.0",
"types": "authentication",
"enabled": "yes"
},
"files": {
"installed_version": "1.13.1",
"types": "filesystem",
"enabled": "yes",
"cronjob_scan_files": "500"
},
"files_pdfviewer": {
"installed_version": "1.7.0",
"types": "",
"enabled": "yes"
},
"files_rightclick": {
"installed_version": "0.15.2",
"types": "",
"enabled": "yes"
},
"files_sharing": {
"installed_version": "1.10.1",
"types": "filesystem",
"enabled": "yes"
},
"files_trashbin": {
"installed_version": "1.8.0",
"types": "filesystem,dav",
"enabled": "yes"
},
"files_versions": {
"installed_version": "1.11.0",
"types": "filesystem,dav",
"enabled": "yes"
},
"files_videoplayer": {
"installed_version": "1.7.0",
"types": "",
"enabled": "yes"
},
"firstrunwizard": {
"installed_version": "2.7.0",
"types": "logging",
"enabled": "yes"
},
"logreader": {
"installed_version": "2.3.0",
"types": "",
"enabled": "yes"
},
"lookup_server_connector": {
"installed_version": "1.6.0",
"types": "authentication",
"enabled": "yes"
},
"mail": {
"installed_version": "1.1.2",
"enabled": "yes",
"types": ""
},
"nextcloud_announcements": {
"installed_version": "1.7.0",
"types": "logging",
"enabled": "yes",
"pub_date": "Thu, 24 Oct 2019 00:00:00 +0200"
},
"notifications": {
"installed_version": "2.6.0",
"types": "logging",
"enabled": "yes"
},
"oauth2": {
"installed_version": "1.6.0",
"types": "authentication",
"enabled": "yes"
},
"onlyoffice": {
"installed_version": "4.1.4",
"enabled": "yes",
"types": "filesystem",
"DocumentServerUrl": "https:\/\/testcloud.chmx.de\/index.php\/apps\/documentserver_community\/",
"defFormats": "{\"docx\":true,\"pptx\":true,\"xlsx\":true,\"odp\":true,\"ods\":true,\"odt\":true,\"doc\":true,\"ppt\":true,\"xls\":true}",
"editFormats": "{\"csv\":true,\"docx\":true,\"pptx\":true,\"txt\":true,\"xlsx\":true,\"odp\":true,\"ods\":true,\"odt\":true,\"rtf\":true}",
"sameTab": "true"
},
"password_policy": {
"installed_version": "1.8.0",
"types": "",
"enabled": "yes"
},
"photos": {
"installed_version": "1.0.0",
"types": "",
"enabled": "yes"
},
"privacy": {
"installed_version": "1.2.0",
"types": "",
"enabled": "yes"
},
"provisioning_api": {
"installed_version": "1.8.0",
"types": "prevent_group_restriction",
"enabled": "yes"
},
"recommendations": {
"installed_version": "0.6.0",
"types": "",
"enabled": "yes"
},
"serverinfo": {
"installed_version": "1.8.0",
"types": "",
"enabled": "yes"
},
"settings": {
"installed_version": "1.0.0",
"types": "",
"enabled": "yes"
},
"sharebymail": {
"installed_version": "1.8.0",
"types": "filesystem",
"enabled": "yes"
},
"spreed": {
"stun_servers": "REMOVED SENSITIVE VALUE",
"installed_version": "8.0.4",
"enabled": "yes",
"types": "prevent_group_restriction",
"project_access_invalidated": "1"
},
"support": {
"installed_version": "1.1.0",
"types": "session",
"enabled": "yes"
},
"survey_client": {
"installed_version": "1.6.0",
"types": "",
"enabled": "yes"
},
"systemtags": {
"installed_version": "1.8.0",
"types": "logging",
"enabled": "yes"
},
"talk_simple_poll": {
"installed_version": "1.1.0",
"enabled": "yes",
"types": "prevent_group_restriction"
},
"text": {
"installed_version": "2.0.0",
"types": "dav",
"enabled": "yes"
},
"theming": {
"installed_version": "1.9.0",
"types": "logging",
"enabled": "yes"
},
"twofactor_backupcodes": {
"installed_version": "1.7.0",
"types": "",
"enabled": "yes"
},
"updatenotification": {
"installed_version": "1.8.0",
"types": "",
"enabled": "yes"
},
"viewer": {
"installed_version": "1.2.0",
"types": "",
"enabled": "yes"
},
"workflowengine": {
"installed_version": "2.0.0",
"types": "filesystem",
"enabled": "yes"
}
}
}

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

Client configuration

Browser:
firefox 72.0.2
Operating system:
Manjaro

Logs

Web server error log


Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)


Nextcloud log

Insert your Nextcloud log here

Browser log


Browser log

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

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

0. Needs triage bug sharing needs info

Most helpful comment

I encounter the same problem on NC 18.0.2, exactly as described in the first post.
Upgraded from NC 15,16,17.
sharing.force_share_accept ist not set in config.php
User has auto-accept of shares enabled/unchanged in this profile settings.

All new shares are listet under ?view=pendingshares and have to be accepted, which then works, but the users get no notification (neither activity, nor mail).

It works when resharing the folders with the group (new folder shares are immediately visibile).

All 14 comments

I just tried to reproduce your issue, could it be that the newly created user has to accept the shares before accessing them? On my test, there was a notification from before the user existed.

@kesselb is this intended? On the one hand, it sounds sensible to accept the shares first as a new user. But imagine there is a quite large number of shares, then this does not sound like a good user experience. Maybe it is better to default to accept all shares as a new user.

I'm not sure. There is a new configuration flag to auto accept shares. Might be helpful for such a setup.

https://github.com/nextcloud/server/blob/0d651f106c3bd317835c15cc82f3689d71432d48/config/config.sample.php#L1341-L1345

If it helps, I'm experiencing this also, my configuration:

Server configuration

Operating system:
Ubuntu 18.04.4 LTS
Web server:
apache2
Database:
mariadb Ver 15.1 Distrib 10.1.43-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
PHP version:
7.4.2
Nextcloud version: (see Nextcloud admin page)
18.0.1.3
Updated from an older Nextcloud/ownCloud or fresh install:
Fresh install
Where did you install Nextcloud from:
Download from nextcloud.com
Signing status:


Signing status
No errors have been found.

List of activated apps:


App list

Enabled:

  • accessibility: 1.4.0
  • activity: 2.11.0
  • bruteforcesettings: 1.5.0
  • calendar: 2.0.2
  • cloud_federation_api: 1.1.0
  • comments: 1.8.0
  • dav: 1.14.0
  • documentserver_community: 0.1.5
  • federatedfilesharing: 1.8.0
  • federation: 1.8.0
  • files: 1.13.1
  • files_pdfviewer: 1.7.0
  • files_rightclick: 0.15.2
  • files_sharing: 1.10.1
  • files_trashbin: 1.8.0
  • files_versions: 1.11.0
  • files_videoplayer: 1.7.0
  • logreader: 2.3.0
  • lookup_server_connector: 1.6.0
  • nextcloud_announcements: 1.7.0
  • notifications: 2.6.0
  • oauth2: 1.6.0
  • onlyoffice: 4.1.4
  • password_policy: 1.8.0
  • photos: 1.0.0
  • privacy: 1.2.0
  • provisioning_api: 1.8.0
  • serverinfo: 1.8.0
  • settings: 1.0.0
  • sharebymail: 1.8.0
  • support: 1.1.0
  • survey_client: 1.6.0
  • systemtags: 1.8.0
  • theming: 1.9.0
  • twofactor_backupcodes: 1.7.0
  • updatenotification: 1.8.0
  • user_saml: 3.0.1
  • viewer: 1.2.0
  • workflowengine: 2.0.0
    Disabled:
  • admin_audit
  • contacts
  • encryption
  • files_external
  • firstrunwizard
  • mail
  • oidc_login
  • recommendations
  • sociallogin
  • spreed
  • text
  • user_ldap

Nextcloud configuration:


Config report

{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"nextcloud.bawue.bdp.org"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "18.0.1.3",
"overwrite.cli.url": "https:\/\/nextcloud.bawue.bdp.org",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"skeletondirectory": "",
"overwriteprotocol": "https",
"allow_user_to_change_display_name": false,
"lost_password_link": "disabled",
"maintenance": false
}
}

Are you using external storage, if yes which one: local/smb/sftp/...
no
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
saml, but error persists if user is created before (and therefore backend is listed as Database)

LDAP configuration (delete this part if not used)


LDAP config
There are no commands defined in the "ldap" namespace.

Client configuration

Browser:
Firefox
Operating system:
Ubuntu 18.04.4 LTS

Is there any hack / work-around except for resharing? Something like occ's file-scan for shares that I can trigger to fix this?

EDIT: @kesselb When logging on via SAML, there are no notifications about accepting shares, also accepting shares automatically is checked for the user in question.
However, when creating a user locally (not through SAML) and logging in directly, I do receive a notification which I can accept. That notification is not shown when I log in via SAML (I might investigate and repost there, if appropriate).
Clicking on the 'x' to make the notification go away simply rejects the share (I suppose, at least I cannot see it anywhere).
Also, and more important, neither 'sharing.enable_share_accept' => false, nor 'sharing.force_share_accept' => false, do anything for me at all. Same goes for the "Accept shares by default"-checkbox in the user-settings. Is there an issue for that yet? I haven't found one, I feel it's related to this (symptoms match), so posting here as an answer.

EDIT: Probably related: https://github.com/nextcloud/server/issues/18958

I encounter the same problem on NC 18.0.2, exactly as described in the first post.
Upgraded from NC 15,16,17.
sharing.force_share_accept ist not set in config.php
User has auto-accept of shares enabled/unchanged in this profile settings.

All new shares are listet under ?view=pendingshares and have to be accepted, which then works, but the users get no notification (neither activity, nor mail).

It works when resharing the folders with the group (new folder shares are immediately visibile).

@steav is there any way to get into the "pending shares"-menu without editing the link?

@shukon Yes, it's not easy to find; on Files view, "Shares" in the left side bar can be unfolded into a submenu, when clicking just on its icon.

The Problem still exists in 18.0.3 – is this fixed in 18.0.4?
Only when this is working, the "share with group" concept does make sense at all.

Quick and dirty solution that works for me.
Connect to your mysql server. Select nextcloud database.
select share_with,accepted from oc_share where file_target="/share_name";
Output looks like that:
| share_with | accepted |
| your_group | 0 |
Then change field "accepted" to 1
update oc_share set accepted=1 where file_target="/share_name" and share_with="your_group";

Don't forget to backup your database.

Upgrading to from 18.0.3 to 18.0.6 solved this for me (I guess #20150). Thanks a bunch! :tada:

Still not working on new ldap-users in nextcloud 19.0.4
Already shared files and folders are still pending shares.

@rullzer @blizzz don't we accept all existing share by default on new users now?

For us, this behaviour came after updating to Nextcloud 20.0.1 (from 19). We did not have this before.

We had a regression during transition of event system used for this. The events from the LDAP backend were ignored in this time. But this was solved with 18.0.10., 19.0.4 and 20.0.1.

In general it takes up to one hour, because group changes are processed in a background job.

Unfortunately, we continue to have the same problem, even with Nextcloud 20.0.2. We did not have it in Nextcloud 19, it came with 20.0.1.

Is there anything we need to configure to make it work again?

  • The users can see a pending share at https://cloud.example.com/apps/files/?dir=/&view=pendingshares but when they try to accept it, they get an error Something happened. Unable to accept the share.
  • The configuration values sharing.enable_share_accept and sharing.force_share_accept are not set in our instance
  • On the new users settings page (https://cloud.example.com/settings/user/sharing), the option Accept user and group shares by default is checked by default
Was this page helpful?
0 / 5 - 0 ratings