winnfsd / vagrant-winnfsd

Manage and adds support for NFS for Vagrant on Windows.
Other
567 stars 62 forks source link

File and folder permissions #75

Open Idealien opened 8 years ago

Idealien commented 8 years ago

Host: Win 7 / Guest: CentOS 6.5 Vagrant 1.7.4 Virtualbox: 5.0.8 and 4.X previously with same issue

When trying to use this on the core /vagrant path with ansible playbooks, I get a series of errors that hosts files (that store .yaml config variables) cannot be set as executable and should chmod -x any. Many combinations of :mount_options were tested having no effect:

config.vm.synced_folder '.', '/vagrant/', :nfs => { :mount_options => ["dmode=775","fmode=664"] }
config.vm.synced_folder './', '/vagrant/', :mount_options => ["dmode=775","fmode=664"]

For this particular folder I stuck with the vagrant default shared folders b/c these items do not change all that much.

config.vm.synced_folder './', '/vagrant/', :mount_options => ["dmode=775","fmode=664"]

However individual site folders (WordPress in LEMP) do change frequently, and the mix of rsync / rsync-back I use now is growing frustratingly long in the tooth. I would really love to see NFS on windows succeed. For these folders, I run into issues where the application is not able to create folders. Uploading files via the application seems to be okay.

I'd figure it to be an owner/group issue, but attempts to add it to the synced_folder options give an error that is not an option for NFS. Here's my current synced_folder

config.vm.synced_folder '../sites/demo.ca', '/srv/www/demo.dev/current', :nfs => { :mount_options => ["dmode=775","fmode=664"] }

and comparable one that allows rync to get by ok

config.vm.synced_folder '../sites/demo.ca', '/srv/www/demo.dev/current',
    owner: "vagrant", group: "vagrant", type: "rsync", rsync__args: [ "--verbose", "--archive", "--delete", "-z", "--chmod=Dugo=rwx,Fugo=rw" ],
            rsync__exclude: [".git/", ".idea"]

Suggestions?

jstuyts commented 8 years ago

I guess we have to wait for https://github.com/mitchellh/vagrant/issues/7466 to be released. Then the FreeBSD mount options for NFS will hopefully let us control the permissions as desired.

I think this plug-in can do very little to provide the requested functionality as it depends on the features of the filesystem driver on the guest.