首先不能rm / unlink文件,但可以在vim和写入文件之后
注意:看起来像将selinux设置为Permissive模式不会阻止此文件权限问题。 我们有一个运行CentOs 7.2.1511的开发虚拟机。 文件通过NFS(通过vagrant(virtualbox))与我们的主机(Mac)共享。 NFS共享是我们可以在主机上使用PHPStorm编辑代码。 如果我们使用SMB共享,这个问题不会突然出现,但是文件共享r / w性能会慢得令人不快。 stream浪者的分享设置是: config.vm.synced_folder "code", "/srv/client/code" , :nfs=>true, :mount_options => ['rw,noatime,nolock,vers=3,udp,fsc,actimeo=2,resvport,rsize=32768,wsize=32768'] 当运行git checkout x或者git clean -df ,我们会收到权限被拒绝的消息。 $ git clean -df warning: failed to remove modules/node_modules/acorn/bin/acorn warning: failed to remove modules/node_modules/acorn/bin/generate-identifier-regex.js … 运行ls -Z modules/node_modules/acorn/bin/acorn $ ls -Z modules/node_modules/acorn/bin/acorn -rwxr-xr-x. 503 games system_u:object_r:nfs_t:s0 modules/node_modules/acorn/bin/acorn 哪个是共享的正确用户/组以及正确的文件上下文,与可移动文件完全相同。 例如 $ ls -Z […]