将git存储库移动到nfs会导致权限错误 [英] Moving git repositories to nfs causes permission errors

查看:595
本文介绍了将git存储库移动到nfs会导致权限错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用redmine-git-hosting插件运行redmine服务器来控制git repos。存储库目录指向安装在 / srv / share 的独立硬盘驱动器。现在安装程序正在改变,我试图将repos移动到另一台服务器上的nfs共享。



挂载工作正常,我只是将fstab中的条目文件从 / etc / sdb1 ip:/ share 。现在我之前有一些权限问题,因为驱动器同时被redmine(用户www-data)和gitolite(用户git)访问,所以我运行了 chmod -R 777 在整个驱动器上处理这个问题。

我将Windows NFS服务器设置为相同的umask(它在那里是000,出于某种原因它是反转的),事实上两个用户都可以读取和写入驱动器。但是现在当试图用redmine创建一个新的存储库时,会弹出错误500。无用的日志条目说 Rugged :: NetworkError(将远程发送的包文件解包失败):



git repos已经在服务器上配置好了,当我尝试向其中一个提交某些内容时,会弹出以下错误消息:

 合计3 (delta 0),重用0(delta 0)
POST git-receive-pack(397字节)
remote:fatal:关闭sha1文件时出错:Permission denied

任何想法在这里做什么?



nfs客户端,redmine和git服务器: ubuntu服务器14.04.4 LTS

nfs服务器:haneWin nfs服务器在Windows Server 2012 R2上

解决方案

整个事情很奇怪。最后,我使用了虚拟vdi磁盘,该磁盘存储在Windows服务器上的一个文件夹中,该文件夹由ubuntu通过SMB共享和安装(至 / srv / shareSMB )。然后,vdi再次被Ubuntu安装到原来的 / srv / share 。这是有效的。



我认为这个问题导致unix和Windows世界在文件结构,尤其是链接方面存在差异。 Gitolite似乎与链接工作很多,这可能是所有邪恶的根源,这样所有的gitolite回购都被打破了,我需要重新安装它。


Im running a redmine server with the redmine-git-hosting plugin to control git repos. The repository dir points to a separate hard drive mounted at /srv/share. Now the setup is changing and I'm trying to move the repos to a nfs share on another server.

The mount works fine, I simply replaced the entry in the fstab file from /etc/sdb1 to ip:/share. Now I had some permission problems beforehand since the drive is accessed by redmine (user www-data) and gitolite (user git) at the same time, so I ran a chmod -R 777 on the whole drive to deal with this.

I set the Windows NFS server to the same umask (It's 000 there, for some reason it's inverted) and in fact both users can read and write to the drive. But now when trying to create a new repository with redmine, error 500 pops up. The unhelpful log entry says Rugged::NetworkError (unpacking the sent packfile failed on the remote):

Now there are git repos already configured on the server and when I try to commit something to one of them the following error pops up

Total 3 (delta 0), reused 0 (delta 0)
POST git-receive-pack (397 bytes)
remote: fatal: error when closing sha1 file: Permission denied

Any ideas what to do here?

nfs client, redmine and git server: ubuntu server 14.04.4 LTS
nfs server: haneWin nfs server on Windows Server 2012R2

解决方案

So this entire thing is pretty weird. In the end I went with a virtual vdi disk which is stored on a folder on the Windows server which is shared and mounted by ubuntu through SMB (to /srv/shareSMB). The vdi is then again mounted by ubuntu to the original /srv/share. This works.

I think the problem(s) resulted in the differences between the unix and the Windows world when it comes to file structures, especially links. Gitolite seems to work with links quite a lot, that might have been the root of all evil, that way all the gitolite repos were broken and I needed to reinstall it.

这篇关于将git存储库移动到nfs会导致权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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