Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

If a synced folder's owner or group is set in config.yml, use it. #872

Closed
wants to merge 1 commit into from

Conversation

fabacab
Copy link

@fabacab fabacab commented Aug 18, 2016

In some cases, synced folders exhibit permissions issues as described in Drupal VM's documentation. The suggested fix is currently to edit the Vagrantfile in such a way as to add owner and group options to Vagrant's mount operation. This forces end users to maintain a patched Vagrantfile that differs from the one under version control.

This patch addresses the issue by allowing an untracked config.yml file to set these synced folder options, instead. If no options for owner and group are explicitly defined, a default value of vagrant is set so as to conform to the Vagrant default user conventions. As a result, if a user experiences this issue, they can write a config.yml section for synced folders that looks like the following while leaving the Drupal VM core Vagrantfile untouched:

vagrant_synced_folders:
  - local_path: "."
    destination: "/var/www/drupalvm"
    type: ""
    create: true
    owner: "www-data"
    group: "www-data"

With such a stanza in one's config.yml file, the executed Vagrantfile will be the equivalent of a line such as:

config.vm.synced_folder ".", "/var/www/drupalvm", owner: "www-data", group: "www-data", create: true

@fabacab fabacab force-pushed the synced-folder-ownership branch from 41033f3 to 88c4bfc Compare August 18, 2016 14:56
@oxyc
Copy link
Collaborator

oxyc commented Oct 16, 2016

Not as clean but you can do this already using the options_override option

oxyc added a commit to oxyc/drupal-vm that referenced this pull request Nov 16, 2016
geerlingguy added a commit that referenced this pull request Nov 16, 2016
Fixes #872: Update synced folder troubleshooting docs taking into account options_override
brandonratz pushed a commit to confcats/drupal-vm that referenced this pull request Nov 18, 2016
kekkis pushed a commit to kekkis/drupal-vm that referenced this pull request Feb 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants