I've got a website project under version control that relies on files from an unversioned directory on the same server via Symbolic Links.

I'm currently storing the symbolic links in the repository. The idea is that if someone checks out a working copy on to the same server they can edit and test the working copy of the project before committing it back to the repository.

When they checkout their working copy it successfully sets up the symlinks so that the entire site works when testing.

The users that work on the project are Windows users, so I've set a samba shares on the server and then mapped them to network drives in Windows. People can edit their working copies directly on the server via network shares and then test them in the web browser before committing their changes back to the repository via TortoiseSVN.

The Problem

The problem I have is that Samba resolves the symlinks as expected but when a user tries to commit their changes back to the repository, TortoiseSVN thinks the linked files are part of the project and tries to commit the target files to the repository and not the symlinks themselves.

I tried turning off symlink support in samba which means that the linked files cannot be resolved as I don't really want people to have access to the linked files nor do I want to import the linked files in the repository. The problem with this is that I get Can't stat '\webserver\projects\working\project\symlinked_file.php'. Access is denied

Apart from the symlink problem everything else works 100% perfectly. Users can either checkout website projects to their machine and work on them (but can't test) or checkout them out to their space on the dev web server and work on them and fully test. So I don't want to change the workflow process, I just need a solution to the symbolic link issue.

Many thanks.

Originally posted on StackOverflow: https://stackoverflow.com/questions/2400917/svn-samba-and-symbolic-links-how-to-get-them-all-to-play-together


I have got a somewhat similar setup, but I chose to not include the symlinks in svn.

Instead, I have made a script that simply creates the symlinks after the checkout.


  • Are you using Samba?, because that seems to be the cause of my problems. As the Windows SVN client tries to commit the target symlinked files back to the repository. – Camsoft Mar 8 '10 at 12:28
  • No, sorry. I use svn+ssh for my repositories. Perhaps a workaround could be a script that unlinks the symlinks and then commits? – Ger Apeldoorn Mar 8 '10 at 13:48
  • Yeah interesting idea. I've now removed the symlinks from the repository and written a shell script to set up the symlnks in a new working copy. – Camsoft Mar 8 '10 at 14:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.