无法更改vagrant主文件夹中文件夹的权限

问题描述:

当我进入我的vagrant vm时,我可以更改vagrant用户文件夹之外和之外的文件和文件夹的权限,以及vagrant用户文件夹中的文件的权限。但不能更改vagrant用户文件夹下的文件夹的权限。我有同样的问题,无论是作为vagrant用户和root登录。

When I ssh in to my vagrant vm, I can change permissions of files and folders above and outside the vagrant user folder, and for files within the vagrant user folder. But cannot change permissions for folders under the vagrant user folder. I have the same problem whether logged in as the vagrant user and root.

在更改vagrant用户的文件夹中的权限是否有某种限制? vagrant用户文件夹不与主机操作系统共享,但capistrano deploy文件夹和docRoot是。

Is there some sort of restriction on changing permissions in the vagrant user's folder? The vagrant user folder is not shared with the host OS, but the capistrano deploy folder and the docRoot are.

访客是CentOS 6,主机是OS X 10.7。 Vagrant为1.0.5。 Virtualbox是4.2.1。

Guest is CentOS 6, Host is OS X 10.7. Vagrant is 1.0.5. Virtualbox is 4.2.1.

共享文件夹的格式在不同版本的Vagrant之间改变。请参阅Fabio的回答 http://serverfault.com/questions/398414/vagrant-set-default-share - 允许

The format for shared folders changes across different versions of Vagrant. See Fabio's answer http://serverfault.com/questions/398414/vagrant-set-default-share-permissions

.vm.share_folderv-data,/ export,/ export,:owner => 'vagrant',:group =>'httpd',:extra => 'dmode = 775,fmode = 775'

在Vagrant 1.3.1及更高版本中, extra 选项已替换为 mount_options 数组。

In Vagrant 1.3.1 and later, the extra option has been replaced with mount_options that expects an array.

config.vm.share_folderv-data,/ export,/ export,:owner => 'vagrant',:group =>'httpd',:mount_options => ['dmode = 775','fmode = 775']

在vagrant 1.3.3中, config.vm.share_folder 显示为 config.vm.synced_folder

In vagrant 1.3.3 it appears config.vm.share_folder has been replaced with config.vm.synced_folder.

config.vm.synced_folderv-data,/ export,/ export,:owner => 'vagrant',:group =>'httpd',:mount_options => ['dmode = 775','fmode = 775']