SMB Sync multiple users
Server configuration
Operating system:Ubuntu 18.04 **Web server:Apache 2.4.29 **Database:mariadb Ver 15.1 **PHP version:7.2.15 **Nextcloud version:15.0.7 **Desktopclient 2.5.0++ **Client OS:Windows 10/ Windows 7 **SMB Server 2016
The issue you are facing:
Is this the first time you’ve seen this error? (Y/N): N
Hello together. Given is an nextcloud updated to 15.0.7 on an Ubuntu 18.04 up to date and smbclient Version of 4.9.5 because auf troble of Notification SMB in the 4.7.X version that comes with Ubuntu but the following problem is regardless of that.
Userbackend is LDAP (AD) on an Server 2016. It is used the external_store SMB/CIFS with logindata saved in Database. In the Store is Accessenumeration active, the share has a lot of sub folders.
All Users uses the Nextcloud Desktop client. User A changes an File on the Share on first Level the on the Desktop the File Changes will be submitted to User B as well. User A changes an File though web-browser (even txt) the changes only submitted to user A, user B has to open the file in the browser or to visit the folder of the file in the browser, than it will be synced to the computer.
User A changes an file or create an file in an subfolder, no changes will be noticed for user B. If user B browses to the file, than it will be synced.
The expected behavior is, that user A changes an file or creates something on the share (per client or browser), user B will sync the data to his desktop as well. A view minutes after i was upgrading from 15.0.4 to 15.0.7 it worked like this but than all of a sudden it stopped working. There no errors in the Logfiles of the nextcloud so far.
If the share set up with username and password saved in the nextcloud, than it works. But than the accessenumeration on the fileserver could not be used. Because the fact, that changes on the first level got noticed, as log as it was initiated per client are synced, shows that it should work also for subfolder as well. The nextcloud should know what file was changed and provide the clients the information so the clients can check the backend store.
Is there a workaround to force the clients to checkup the store for changes?
Thank you for help.
Hi, if have same issues
Maby it is an Bug related to the Syncclient itself.
Push push, still not working :-) If the server and the desktopclient would proerly share information about filechanges among all users Live would be much easyer. :-)
Push
Are you looking for https://docs.nextcloud.com/server/16/admin_manual/configuration_files/external_storage/smb.html?highlight=notify#smb-update-notifications?
Tested Nextcloud Server 15.0.4.0 PHP: 7.2 Ubuntu 18.04.2 SMB Backend on Server 2012, Credential saved in Database. Authbackend: LDAP (AD) Clients: Nextcloud-2.2.3.4-, Nextcloud-2.2.4.2, Nextcloud-2.3.1.8, Nextcloud-2.3.2.1, Nextcloud-2.3.3.1, Nextcloud-2.5.1, Nextcloud-2.5.3.5526-daily-20190614 As long there is only one User that uses the Client to Sync date between Server and Client and the changes are only made by the Client the sync will work.
The moment there are two users that sync and changes the same data it will not work. User A changes, and the Changes are synced to the Server but User B will never get any changes as long he changes some file in the same Folder itself. In this moment magically the changes made by User A will also synced but user A will not get the Changes of user B….
Also as normal there are changes on the Fileserver itself, there will no sync between Server and User, as long there is some changes by the User….
Expected is there is a change on the User A User B will get the changes synced. B changes something A will also get the information. Also if something is changed on the external storage by User C, it should by synced to the Nextcloud user A and B.
The server should manage all changes of the users in the database and the clients should look the server database for changes off all data of all users they have access. And on the server should be possible to set a sync-user to check the external storage for changes, and store it in the database to inform all the users.
@kesselb Thx for the Link. I read it before, waht the link does not say, how can this used to create realtimenotification of changes for each user? The administrator does not have the passwords, the users will not type in the line. Is it enough that i create an croncom in on user context an all users will have access to the information and by up to date?
I need something that helbs to keep all the date in sync between multiple users without useraction.
cc @wiswedel @cowai any idea? I'm not familiar with smb.
There was a SMB notify reconnection fix 15.0.8 for when the DB connection times out. That could explain why @thechonta says it works for a little while. I have never used per user mounts. Only global smb mounts. Its very important to have the latest nextcloud for SMB as I did some PR to fix my use cases quite recently.
@thechonta Can you reproduce this in 15.0.8? Also, I would recommend latest 16 as that is what I tested my PRs on: https://github.com/nextcloud/server/pulls?utf8=%E2%9C%93&q=is%3Aclosed+is%3Apr+author%3Acowai+
I will be able to go on the latest 16 of nextcloud on Thursday maby tomorrow. i will leave a comment :-) Thx for respond :-)
https://help.nextcloud.com/t/mounting-hidden-share-as-external-cifs-storage-fails-after-nextcloud-16-upgrade/55273 After Update to 16.0.1 an Externale Share with $ (hitten share) on MS Server 2016 is marked red. But it is possible to access all folders if you know the path url / or set the subfolders as favorite.
https://help.nextcloud.com/t/mounting-hidden-share-as-external-cifs-storage-fails-after-nextcloud-16-upgrade/55273 After Update to 16.0.1 an Externale Share with $ (hitten share) on MS Server 2016 is marked red. But it is possible to access all folders if you know the path url / or set the subfolders as favorite.
https://github.com/nextcloud/server/issues/15567 is the related issue.
https://github.com/nextcloud/server/issues/15567
if (strpos(rtrim($option, '$'), '$') !== false) {
$result = false;}
Did the magic :-)
Did the magic :-)
- Upgraded to Nextcloud 16 and run into the issue with the hidden shares
- Applied the patch and the hidden share is working again
- The sync issue is still happening (if not we could close this issue)
Right? It's quite hard to follow you. Please try to be precise about your problem. Thank you :+1:
-
Upgraded to Nextcloud 16 and run into the issue with the hidden shares yes
-
Applied the patch and the hidden share is working again yes (lot of thanks to the one who found out :-) )
-
The sync issue is still happening sadly yes the sync is still not working as expected. Even with the latest dayly Desktopclient it did not work (no matter if windows or Linux Client)
User B Change a File and User A will not Sync the changes till he create a file or does any Changes (one folder above the file that changes or in some folder beneth) It looks that it will only searched for changes if you do changes by yourself and not check the database on the server for just in case Even an force syncing has no effect.
The Sync issue is still there.
@thechonta just to confirm I understand your issue: It is only happening if you use access enumeration? More info about access enumeration here.
@icewind1991 is access enumeration with multiple credentials supported in files_external?
@cowai Thx for Respond. On Shares without access enumeration it is the same.
@thechonta This is a long shot, but, could you try out desktop client version 2.3.3? Maybe this is related to this issue: https://github.com/nextcloud/desktop/issues/1000
Allready tested with the following clients: Clients: Nextcloud-2.2.3.4-, Nextcloud-2.2.4.2, Nextcloud-2.3.1.8, Nextcloud-2.3.2.1, Nextcloud-2.3.3.1, Nextcloud-2.5.1, Nextcloud-2.5.3.5526-daily-20190614