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.
svn: Can't open file 'PATH/TO/YOUR/FILES/.svn/lock': Permission deniedThe 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.
# go to the path of your project
cd /PATH/TO/MY/PROJECT
# reset ownership
# NOTE: replace apache.staff with your user and group
sudo find . -exec chown apache.staff {} \;
# reset permissions
# NOTE: replace 2770 with your file permissions
sudo find . -exec chmod 2770 {} \;
# Now you can run the cleanup command to repair your .svn folders
svn cleanup










This worked for me. Thanks!
This worked for me. Thanks!
Thanks
Thanks
SVN Permissions Fixed on OSX
LOOK here if you are using OS X!!! This was an insidious OSX ACL problem! Somehow, my OSX "permissions" in the "Get Info" in Finder for the svn controlled folder had an entry where my user was "Read Only". I fixed it by "Get Info" on my home dir and and propagating the default OSX permissions with "Apply to enclosed items" with the gear wheel below the ACL (access control listings) under "Sharing & Permissions:" in the "Info". You may need to click the lock at the bottom right of the "Info" window. ACL is good for some things, but it is easy to forget about if you come from the UNIX world where one gets used to permissions being set in the file system entries.
Thanks!
This saved our butts. It worked great. Thanks.
it helped me too!
thanks. genius
Just wanted to say thanks!
I know this is an old article but it just solved a big problem I was having with Versions on Mac OSX so it's still relevant and works perfectly!
I had to use MYUSERNAME:staff but, as you say, that's OS-specific.
Thanks so much!
correction
Hi,
I think you meant apache:staff.
OS specific
yes, good point. Some OSs use "." and some use ":"