Moving git repositories to nfs causes permission errors
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
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
One Solution collect form web for “Moving git repositories to nfs causes permission errors”
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.