Is there a possibility to temporarily share a directory per Samba?
With Python 3 i can serve the current directory per HTTP using:
python -m http.server
.
I'd like to do the same thing with Samba.
file-sharingsamba
Is there a possibility to temporarily share a directory per Samba?
With Python 3 i can serve the current directory per HTTP using:
python -m http.server
.
I'd like to do the same thing with Samba.
Best Answer
There doesn't appear to be a way to create an ad-hoc share similar to the way
exportfs
does it for NFS on Linux andshare
does it on Solaris. Reasons may vary but you could technically do something like described in the page for Running Multiple Servers on the same machine and with the customsmb.conf
accomplish what you need to do.There is also an option to create and delete shares dynamically using SWAT, which will require changes to smb.conf to allow this to happen see sections on
add share command
anddelete share command
Personally if you want to have a share dynamic you might want to share your home directory and use dynamic home shares via samba discussed in many places including Ubuntu forums, and Samba mailing list.