无法更改vagrant主文件夹中文件夹的权限 [英] Cannot change permissions of folders within vagrant home folder

查看:1123
本文介绍了无法更改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']

这篇关于无法更改vagrant主文件夹中文件夹的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆