Troubleshooting Subversion

301 errors

If you are receiving 301 errors saying "repository has been moved permanently to [some other url]", then check these things:

  • Make sure that you haven't created your repository called "svn" or inside of a directory called "svn".
  • Make sure you don't have .htaccess rules above the subversion directory that are causing any kind of re-write (like WordPress). This includes having DreamHost automatically add 'www.' to your URL. View the Removing the "www" from your domain article for further details.
  • If you're running WordPress and want to have your SVN repository excluded from the WP redirection, simply add these rules to your .htaccess:
 # BEGIN WordPress
 <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond %{THE_REQUEST} SVNRepo
 RewriteRule . - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 </IfModule>
 # END WordPress

Make sure to change the end of line #5 to the subversion directory name in your WordPress directory.

Import errors

If you are seeing errors where import is working for some but not all files, try disabling your anti-virus software.

File ownership problems

On DreamHost servers, Subversion runs as the dhapache user. If you create a file, it is owned by yourusername, not dhapache and subversion can't read it. It is pretty easy to have this happen.

Once dhapache has lost ownership of the file, your repository becomes unmodifiable and your users will get "permission denied" errors when they try to commit.

Fixing ownership problems

If your repository becomes corrupted through bad ownership, try the following:

  1. Navigate to the (Panel > 'Goodies' > 'Subversion') page.
  2. To the far right of your repository, click the Edit button.
  3. Add a new user and password.
  4. Click the Update my repository now! button to save.

In the process of adding a new user, the DreamHost job will recursively change file ownership for the whole repository back to dhapache.

If this doesn't work, you may have to dump, recreate and reload your repository.

Below are how the permissions should look on your primary /svn directory under your username:

drwxr-xr-x  username pgXXXXXXX svn

In that directory is your Subversion project. Those files should appear with the following permissions:

drwxrwxr-x dhapache pgXXXXXXX mysvnprojectID
-rw-r----- username dhapache  mysvnprojectID.access
-rw-r----- username dhapache  mysvnprojectID.passwd

See also

Did this article answer your questions?

Article last updated .