I want to have nextcloud integrated in a zentyal server, running samba4 as primary domain windows controller. Following some toturials, I’ve managed to configure users from the LDAP server.
In addition, I’d like to configure the following:
a) the nc data directory of each user shall be the users’ data folder (example: /home/samba/shared/users/john)
b) when the user logs in nextcloud, the access to the data folder should be done in behalf of the user.
Is this possible to achieve?
I think not. Nextcloud uses the webserver user and group.
It might be possible to use bind mount with changed user. Then, even if nextcloud uses for example apache-www to access /home/samba/share/Ronald any files would keep the correct permissions. It might be possible to do this other ways though.
This is not a good idea at all, changes via samba are not recognized by nextcloud, to do this, you need to scan the filesystem frequently, which puts strain on the server and is not instant. It would be better to mount the users filesystem via webdav, whixh is provided by nextcloud itself and does not bypass the database.
Webdav is unfortunately not very well handled in Windows. Files opened are stored in a model temp folder and changes to files may not be uploaded.
You can use inotify app for automatic detection of changes from local storage.
When the new virtual drive app is ready it will be a much better solution.
I dropped this and stuck to the default. A common folder for the users’ data separated from the home folders.
I did some experiments with bindfs and inotify, but the updates were not very consistent.
Thanks for the suggestions.