svn: Can't open file 'PATH/TO/YOUR/FILES/.svn/lock': Permission denied

svn: Can't open file 'PATH/TO/YOUR/FILES/.svn/lock': Permission denied

如果出现上面的异常信息,说明你需要重置PATH/TO/YOUR/FILES/目录的svn权限和目录所有者,文件包括隐藏的.svn目录,这时你需要用root权限执行以下命令:

# 进入需要重置权限的目录
cd /PATH/TO/MY/PROJECT

# 重置ownership
# NOTE: replace apache.staff(用户名.用户组) with your user and group
sudo find . -exec chown apache.staff {} \;

# 重置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

posted @ 2012-03-29 15:18  Fannic  阅读(3866)  评论(1编辑  收藏  举报