Resolving the subversion .svn/lock permission denied issue
If you’ve ever gotten the following error, you might need to reset the file permissions and ownership on all of your project files, including the hidden subversion files (located in the .svn folders). This can occur if you’ve ever executed a subversion command as root, which I try to avoid doing.
The following commands can be used to reset the permissions and ownership for all the files in your directory. NOTE: only execute these commands if you feel comfortable with the shell and know what the file permissions should be set to for your files.