Using instructions on this website and a few others, I’ve install Nextcloud on a Dell server with ubuntu 16.04. I’ve added an external folder storage to nextcloud from the admin GUI (directory is /srv/samba/cabinet). This directory is also shared on local network with samba. It is stored on the ubuntu server.
My problem is : I want the folder to be accessible, readable and writable to www-data so that users can access it and modify files from next cloud client when they’re not on the same lan as the server, and I want the samba share to work at the same time, so that users can modify files from computers on the lan not using next cloud but windows explorer.
So far i’ve managed to share the directory with samba, and make it accessible from next cloud, but it is read only on nextcloud GUI.
I created another folder to run tests (/home/sam/partage), added it to nextcloud as external storage, shared it with samba, changed ownership to www-data : this way the folder is writable on nextcloud GUI but not with nautilus on the ubuntu server or from the others computer on the lan.
Is my problem clear enough ?
Is there a way I could set permissions/ownership so that both nextcloud and local users could read and write to the folder ?