我试图在Fedora 18上启动svnserve.service,使用:
systemctl enable svnserve.service
systemctl start svnserve.service但我得到了以下错误:
Feb 21 22:26:51 x.y.com svnserve[1606]: svnserve: E000013: Can't check path '/home/henrik/svn': Permission denied
Feb 21 22:26:51 x.y.com systemd[1]: svnserve.service: control process exited, code=exited status=1
Feb 21 22:26:51 x.y.com systemd[1]: Failed to start Subversion protocol daemon.
Feb 21 22:26:51 x.y.com systemd[1]: Unit svnserve.service entered failed state但是,当我尝试从命令提示符启动svnserve时,它工作得很好:
svnserve -d -r /home/henrik/svn有什么问题吗?
我试图更改/home/henrik/svn目录中的权限,但没有运气.
来自ls -ld /home/henrik/svn:的输出
[root@speedball henrik]# ls -ld svn
drwxr-xr-x. 7 henrik henrik 4096 Feb 21 21:41 svnaudit.log:
type=AVC msg=audit(1361531583.530:291): avc: denied { search } for pid=954 comm="svnserve" name="home" dev="dm-1" ino=2883585 scontext=system_u:system_r:svnserve_t:s0 tcontext=system_u:object_r:home_root_t:s0 tclass=dir
type=SYSCALL msg=audit(1361531583.530:291): arch=c000003e syscall=4 success=no exit=-13 a0=7f2fdcd94438 a1=7fff01357bf0 a2=7fff01357bf0 a3=7fff01357980 items=0 ppid=1 pid=954 auid=4294967295 uid=1003 gid=1003 euid=1003 suid=1003 fsuid=1003 egid=1003 sgid=1003 fsgid=1003 ses=4294967295 tty=(none) comm="svnserve" exe="/usr/bin/svnserve" subj=system_u:system_r:svnserve_t:s0 key=(null)
type=SERVICE_START msg=audit(1361531583.668:292): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="svnserve" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'编辑:
我听从了迈克尔的建议。SELinux不再抱怨svnserve。现在的问题是,svnserve无论如何都不会启动,而且它也没有给我任何好的错误描述:
[root@speedball ~]# systemctl status svnserve.service
svnserve.service - Subversion protocol daemon
Loaded: loaded (/usr/lib/systemd/system/svnserve.service; enabled)
Active: failed (Result: exit-code) since Sun 2013-02-24 22:04:35 CET; 2s ago
Process: 1600 ExecStart=/usr/bin/svnserve --daemon --pid-file=/run/svnserve/svnserve.pid $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1601 (code=exited, status=1/FAILURE)
CGroup: name=systemd:/system/svnserve.service
Feb 24 22:04:35 speedball.x.com systemd[1]: Started Subversion protocol daemon.
Feb 24 22:04:35 speedball.x.com systemd[1]: svnserve.service: main process exited, code=exited, status=1/FAILURE
Feb 24 22:04:35 speedball.x.com systemd[1]: Unit svnserve.service entered failed state发布于 2013-02-22 12:34:06
我们从审计日志中看到,SELinux拒绝svnserve访问以遍历/home目录,从而下降到子目录中。据我所知,svnserveshould允许穿越/home,所以您可能会看到一个bug。因此,您应该报告它的红帽bugzilla。
作为一种解决办法,在等待修复时,可以让svnserve不受SELinux限制地运行(而不会在系统范围内禁用它)。这是暂时的,将被重新命名或包更新取消,所以如果将来的更新不能解决这个问题,您可能不得不重新应用它。
chcon -t unconfined_exec_t $(which svnserve)发布于 2013-03-06 01:33:33
查看/run/svnserve权限和所有者。如果您更改了svnserve运行的用户,则该用户需要能够将svnserve.pid写入/run/svnserve目录。
https://serverfault.com/questions/481285
复制相似问题