Vagrant, I have a fileshare setup with SMB from host-to-guest (h2g) between a virtual machine running on Microsoft's
Hyper-V Hypervisor, and Windows Operating Systems on both, host & guest machines.
Inside my virtual machine, I can access my website files from
C:\vagrant\FileShare\site1 and read/write/modify any file or folder from host or guest successfully. Awesome.
Now I want to setup an IIS website instance to point to my Fileshare located at
C:\vagrant\FileShare\site1\wwww so I went ahead and did this in IIS manually with default settings, default application pool, and the correct paths. I also assigned read/write permissions for
IIS_IUSRS just to avoid any permission issues.
However, when I test out the site I do seem to get permission errors as IIS presents the following error:
0x80070005 - Cannot read configuration file due to insufficient permissions
Is it actually possible to setup an IIS website with Vagrant and Windows? Or is this a limitation with Vagrant?
One solution I've seen people suggest is using a filesync program inside the guest OS so that the files are available on the host Operating Filesystem. However, this isn't practical as it adds more complexity to the setup and takes twice the amount of storage space, which was my reason for switching to a Vagrant setup in the first place.
In linux Vagrant, it's possible to setup a fileshare for a webserver with the following config, where
fmode = file mode and
dmode = directory mode
config.vm.synced_folder folder_source folder_destination, id: "vagrant-root", owner: "vagrant", group: "www-data", mount_options: ["dmode=775,fmode=664"]
But in Windows with an IIS setup I just can't figure out how to do this. Can anyone give any suggestions before I completely give up and go back to developing locally?
User contributions licensed under CC BY-SA 3.0