1

I have a problem with filepermissions working with Gitolite and GitWeb. When I push to a repository, the repository disappears from GitWeb. (I can make it visable again by running : chmod -R +rx ./repositories/my-first-git-repo.git/)

I followed an installation guide to install Gitolite and GitWeb (http://sharadchhetri.com/2013/05/31/how-to-create-own-git-server-with-gitolite-and-gitweb-in-ubuntu/).

Later, when I discovered the problem I added www-data to group git, that was not in the guide. But even after that it does not work...

When I read about it I can't really understand the UMASK syntax, default is 0077 (which should give : rwx------, but to me it looks like rwxrwx---). Every where I read people say that I shuold change to 0027 (for giving access to GitWeb, which I had already from the start just like the guide sad), but to me that seems to lower the group permission from 7 to 2 I (from rwx to r), if this is done for folders they are not readable, is this the problem? It does not make sense to me.

I have now : UMASK => 0027 (in .gitolite.rc)

gitolite.conf : (one of the repo's)

repo my-first-git-repo

config gitweb.description   = First Git repository
        RW          = John
        R           = gitweb

Groups :

git@SilverStone:~$ groups git

git : git

git@SilverStone:~$ groups www-data

www-data : www-data git

Can anyone help me, please?

John Master
  • 309
  • 1
  • 4
  • 18
  • A side note on umask: it's "bits to take away". For instance `012` would clear nothing for user (`0`), executable for group (`1`), and write for others (`2`). `025` (not a normal umask) clears group-`w` (`2`) and other-`rx` (`5`=4+1). It never causes any bits to get *set*: those are supplied by whatever creates the file. File-creation programs mostly should use mode `0666` (`rw-rw-rw-`), but some (mail reader for instance) might use `0600` so that group and other never have permission regardless of umask. Directory-creators mostly should use `0777`. – torek Sep 04 '13 at 20:52
  • Does the issue persists with the very latest gitolite? [commit fa06a34d1](https://github.com/sitaramc/gitolite/commit/fa06a34d1dd51e3ce786eb2c0714c8bc55d5c418) was about setting `umask` as early as possible for it to be taken into account. – VonC Sep 04 '13 at 20:58
  • Thank you for the clarification on UMASK, torek. I also found this page : http://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html – John Master Sep 04 '13 at 21:18
  • VonC : I installed from Gitolite release v. 3.5.2. Is there an easy way to update Gitolite to the latest committed changes? – John Master Sep 04 '13 at 21:24
  • @JohnMaster yes: you can simply clone the gitolite repo and install it from the sources. That is what I do: https://github.com/VonC/compileEverything/blob/master/gitolite/install_or_update_gitolite.sh#L23-L37 – VonC Sep 05 '13 at 06:27

1 Answers1

1

I have now solved the issue, thank's to VonC who informed me about the recent updates to Gitolite. I installed from the latest source on master-branch (Sep 02, 2013) and that solved my issue. Earlier I had installed from the release version 3.5.2.

John Master
  • 309
  • 1
  • 4
  • 18