SVN : 500 internal server error on my repository access

£可爱£侵袭症+ 提交于 2020-01-21 20:49:19

问题


(OS is Ubuntu Server)

I create a new repository with SVN like that :

$ svnadmin create myrepo --pre-1.6-compatible

The first time, when I want to access in my new repository myrepo (with TortoiseSVN tool), I could reach in reading, but in writing, I couldn't (lock SVN message appears). So I found on forum post, a guy who recommanded to set all rights on repository like that :

$ chmod -r 770 myrootrepositories

And after that, I can't access to all my repositories ... with TortoiseSVN, this error appears when I want to access to a repository :

Server sent unexpected return value (500 Internal Server Error) in response to OPTIONS request for https://xx.xx.xx.xx/svn/myrepo

I restart all, but nothing changed...


回答1:


ERROR:

svn: Server sent unexpected return value (500 Internal Server Error) in response to OPTIONS request for

CAUSE: The user's file (or some other file in the project SVN directory), was created using the root account and it has to be owned by the domain account.

Example: domain user is trespatitos (using CPANEL/WHM and Centos 5), so I used:

root@myserver [my project path]# chown -R trespatitos:trespatitos ./* 

That changes the owner and group recursively on the dir I'm standing at.

Also. On the svn.conf file, I have:

AuthUserFile /home/myusername/svn/hds/conf/.svn-users 

While in the SVN folder I made a mistake and name the file: .users-svn

I changed the name and the problem was solved.

Conclusion:

  • Check Ownership
  • Check Permissions 775 or 777 of the SVN dir.
  • Check that the users file actually exists. If it doesn't, use htpasswd -c username .svn-users



回答2:


I suspect the repositories have the 'group'. Set it to the same as the group as the webserver:

sudo chown -R :www-data myrootrepositories



回答3:


Set the ownership of the repository to the same user that runs svnserve.




回答4:


The real cause is an unreadable config file, it can be found on the Cpanel raw error log.

In my case, I was following instructions for an old repo, the file name I used was .users-conf, then I was trying to access .svn-users, the error was logged in the error log.




回答5:


I recently ran into the same problem. Permissions and other items mentioned were OK. But the timestamps on the files were wrong (because copied from an older working copy when needing to change a repository). Just touched everything.



来源:https://stackoverflow.com/questions/4030453/svn-500-internal-server-error-on-my-repository-access

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!