I’m attempting set-up a puphpet vm on Surface Pro 3 w/ Windows 8 and have ran into several road blocks along the way (not surprising). Anyhow most of those road blocks have been related to using smb (Samba) sync file type. I’ve managed google myself into solutions for most of them. However, I have now hit an issue where I can’t seem to find a solution to. I’ve managed to successfully stand-up the vm with vagrant w/ Samba syncing but upon provisioning an error occurs relating to writing to the synced folder directory /var/www. It seems like the Puphpet_apache module doesn’t have the proper permissions to write to that directory given and is exiting with a none zero exit status. The exact error originating from Puphpet_apache is below.
default: Notice: /Stage[main]/Puphpet_apache/Exec[Create apache webroot]/returns: chown changing ownership of ‘/var/www’: Permission Denied
default: Error: mkdir -p /var/www && touch root:www-data /var/www && chmod 775 /var/www && touch /.puphpet-stuff/apache-webroot-created returned 1 instead of [0].
One thing I found suggested to modify the Puphpet vagrant file to force permissions for the smb file type as shown below.
config.vm.synced_folder "#{folder['source']}", "#{folder['target']}", id: "#{i}", type: 'smb', group: sync_group, owner: sync_owner, smb_host: smb__host, smb_username: smb__username, smb_password: smb__password, :mount_options=> ['file_mode=774', 'dir_mode=775']
However, that had no affect.
I also tried to modify the guest /etc/samba/smb.conf file as shown below.
[www]
path = /var/www/
public = yes
writable = yes
comment = smb share
printable = no
guest ok = yes
create mode = 0644
directory mode = 0755
force group = www-data
force user = www-data
Neither did that have any affect.
Does anyone know to prevent apache from erroring out during provisioning when attempting to change the permissions of the /var/www directories when using smb sync file type on a windows 8.1 host?