From 91117f8014c0342bd2c956b4edc41f54dc804148 Mon Sep 17 00:00:00 2001 From: Dusty Mabe Date: Mon, 28 Mar 2016 16:45:23 -0400 Subject: [PATCH] sshfs_mount: make mountpoint accessible to all --- lib/vagrant-sshfs/cap/linux/sshfs_mount.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/vagrant-sshfs/cap/linux/sshfs_mount.rb b/lib/vagrant-sshfs/cap/linux/sshfs_mount.rb index e7da7dd..64c1a28 100644 --- a/lib/vagrant-sshfs/cap/linux/sshfs_mount.rb +++ b/lib/vagrant-sshfs/cap/linux/sshfs_mount.rb @@ -43,8 +43,11 @@ def self.sshfs_mount_folder(machine, opts) expanded_guest_path = machine.guest.capability( :shell_expand_guest_path, opts[:guestpath]) - # Do the actual creating and mounting - machine.communicate.sudo("mkdir -p #{expanded_guest_path}") + # Create the mountpoint inside the guest + machine.communicate.tap do |comm| + comm.sudo("mkdir -p #{expanded_guest_path}") + comm.sudo("chmod 777 #{expanded_guest_path}") + end # Mount path information hostpath = opts[:hostpath].dup