2

安装和配置后,cgit当我尝试打开页面http://servergit/cgit时出现“未找到存储库”错误。gitoliteapache

错误/var/log/httpd/error_log

[cgi:error] [pid 27680] [client 10.76.6.235:42188] AH01215: Error opening projects file /home/git/projects.list: Permission denied (13)

/etc/cgitrc:
enable-git-config=1   
project-list=/home/git/projects.list
scan-path=/home/git/repositories

文件和文件夹权限:

-rw-r--r--. 1  git  git 61      Sep 26 16:54    /home/git/projects.list
drwxr-xr-x. 17 git  git 4096    Sep 28 11:53    git/
drwxr-xr-x.  5 root root      41 Sep 6 16:38    home/

groups git
git : git root apache
groups apache
apache : apache root git
groups root
root : root git apache

我不知道Permission denied (13)错误的原因。

我将 projects.list 复制到/tmp/projects.list并更改cgitrc

project-list=/tmp/projects.list

ls -l  /tmp/projects.list
-rwxrwxrwx. 1 git  git      61 Sep 28 12:13 projects.list
drwxrwxrwt.  13 root root   4096 Sep 28 14:04 /tmp

然后,我得到了新的错误/var/log/httpd/error_log

[cgi:error] [pid 27681] [client 10.76.6.235:44747] AH01215: Error opening projectsfile /tmp/projects.list: No such file or directory

cat /tmp/projects.list
build-scripts.git
build-scripts-test.git
testing.git

我不明白它为什么抱怨"No such file or directory"

ps -ef | grep httpd
root     27661     1  0 11:35 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   27679 27661  0 11:35 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   27680 27661  0 11:35 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   27681 27661  0 11:35 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND
apache   27682 27661  0 11:35 ?        00:00:00 /usr/sbin/httpd -DFOREGROUND

这是一个CentOS 7.2平台。

有人可以提供一些帮助吗?

4

0 回答 0