I have a Windows domain.
I’m joined my NC 18 server to Windows domain with sssd package.
I installed SAMBA on my NC server and created a folder for my domain users:
cat /etc/samba/smb.conf
..
[123]
comment = 123
path = /home/data/123
admin users = 'Domain Admins'
locking = no
browsable = yes
writable = yes
guest ok = yes
read only = no
...
So, how I can make this folder accessible via the web too, so that my domain users can create folders and files via the web with their own domain permissions?
Setting the correct perms will be very hard (if not impossible). NC uses www-data:www-data but CIFS/windoze uses a completely different scheme. Also, you might be in for some interesting errors because for CIFS/windoze FILE==file but for *nix they are different.
you can try to mount -o bind the dir(s) somewhere and see what happens.
GOOD LUCK!
You should make the SMB share on a Windows server and then mount it as external storage in Nextcloud with each user mapping it with their individual AD credentials. Then permissions will be correct.
cool, very nice script! if i ever need it i’ll copy like like hell from it.
i haven’t studied it really in-depth but i think there might be some troubles in AD/“Domain”-environments (not only b/c windoze update constantly breaks things). i’ll be glad to learn the opposite, though.
it might be worth noting to the OP that he (probably) does not need a full-featured samba-server but only some kind of cifs-utils/smbmount-pkg.
from this i gleaned that domain-perms were to be retained pervasively - to which i guess my first answer still applies.
BTW: it is also ppssible to mount a smb-share with the smbmount script and then use that mountpoint in the smb-server script to make it available via smb.