Git目录权限始终为000 [英] Git Directory Permissions Always 000

查看:146
本文介绍了Git目录权限始终为000的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  040000 DirEntry hash 

04表示它是一个目录,但权限是000。意味着Git不存储树权限,或者是Unix如何工作? Git不存储树对象的权限,即使目录Unix文件系统确实拥有它们。对于文件,git只存储可执行位(+ x)​​。所有文件都被认为是可读写的。这意味着只有您将看到blob的模式是 100644 (不可执行)和 100755 (可执行文件)。



有关更多信息,请参见例如有关索引文件中的git商店


By messing around with Git objects, I've found that the tree entries within a tree object always have these permissions.

040000 DirEntry hash

The 04 means that it is a directory, but the permissions are 000. Does this mean that Git does not store tree permissions, or is that how Unix works?

解决方案

Yeah. Git does not store permissions for tree objects, even though directories Unix filesystems do have them. For files, git only stores the executable bit (+x). All files are assumed to be readable and writable. This means that only modes you'll see for blobs are 100644 (not executable) and 100755 (executable).

For more information, see e.g. the documentation on what git stores in the index file.

这篇关于Git目录权限始终为000的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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