I have a script I wrote that monitors a folder and automatically mounts any ISO image files in a folder to /mnt/ISOs and then creates a samba usershare to allow access to the mounted image. The script seems to be working okay, but I have some strange quirks. One of the images I have mounted is the ISO for ubuntu-14.04.2-desktop. Inside this image there is an application (wubi.exe) that no matter what I try I cannot get this app to run directly from the shared folder on a Windows machine.
So, I'm mounting the image as:
mount -o defaults,ro,exec,mode=0777 /mnt/hdd_2/ubuntu-14.04.2-desktop.iso /mnt/ISOs/ubuntu-14.04.2-desktop
The usershare is executed as:
net usershare add ubuntu-14.04.2-desktop /mnt/ISOs/ubuntu-14.04.2-desktop ubuntu-14.04.2-desktop Everyone:F guest_ok=y
Guests are allowed by smb.conf.
I can view the files on the mount in Windows without issue and can freely copy them to a different location. From the new location, they execute perfectly. I cannot get it to execute from the shared folder however.
Server is running Ubuntu Server 16.04.1 Samba is 4.3.9-Ubuntu mount from util-linux 2.27.1 (libmount 2.27.0: selinux, assert, debug)
What might I be doing wrong?