I want to access a samba share from a vhost

NethServer Version: 7.7.1908
Module: samba vhost

Hello,

I have files stored in a samba share (/var/lib/nethserver/ibay/MyFiles) and I want a vhost (/var/lib/nethserver/vhost/MyWebSite) can access them.

I done that, but it did not do the job:
db vhosts setprop MyWebSite open_basedir /tmp:/var/lib/nethserver/vhost/MyWebSite:/var/lib/nethserver/ibay/MyFiles
signal-event vhost-modify MyWebSite

Do I need to add the apache user in the samba group (I use AD)? Not sure it’s secure to do that! Or something else ?
Please help…

I did it for transmission

you can browse the samba download folder with apache

https://github.com/stephdl/nethserver-transmission/blob/ns7/root/etc/e-smith/templates/etc/httpd/conf.d/transmission-WebDL.conf/10base

eventually you can install nethserver-transmission and look the template once expanded

1 Like

Thanks @stephdl,

Not sure this my solution. I understand that your template permit to access a samba share from an URL by the http protocol.

Let me rephrase my problem.
I want a php script (in a vhost) can access files (on a samba share).
So I have add the samba directory in the open_basedir. But it’s not ok.
And I can’t find traces (errors, warnings…) in logs…

I’ve just found a solution… I’ve open the guest acces in samba.
Thanks,

1 Like

I have the exact same problem, any one found solution for open_basedir restrictions