Clarify the owner/group of synced folders

This is the intended behavior but it is not obvious. When setting up synced
folders that require parent folders (e.g. folders that live in Go's `GOPATH`)
this has the potential to catch users off guard. See #2257.
This commit is contained in:
Maxwell Watson 2018-07-27 12:28:49 -04:00 committed by GitHub
parent 0ee1d82359
commit 6713717b95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -27,7 +27,8 @@ The first parameter is a path to a directory on the host machine. If
the path is relative, it is relative to the project root. The second
parameter must be an absolute path of where to share the folder within
the guest machine. This folder will be created (recursively, if it must)
if it does not exist.
if it does not exist. By default, Vagrant mounts the synced folders with
the owner/group set to the SSH user and any parent folders set to root.
## Options
@ -91,9 +92,10 @@ config.vm.synced_folder ".", "/vagrant", disabled: true
## Modifying the Owner/Group
By default, Vagrant mounts the synced folders with the owner/group set
to the SSH user. Sometimes it is preferable to mount folders with a different
owner and group. It is possible to set these options:
Sometimes it is preferable to mount folders with a different owner/group than
the default SSH user. Keep in mind that these options will only affect the
synced folder itself. If you want to modify the owner/group of the synced
folder's parent folders use a script. It is possible to set these options:
```ruby
config.vm.synced_folder "src/", "/srv/website",