---
title: "svn上传文件时Can't open file txn-current-locks问题"
author: "rubyol"
date: "2010-08-12T12:48:43Z"
tags: []
categories: ["研发管理"]
slug: "svn-can-t-open-file-txn-current-locks"
draft: false
lastmod: "2010-08-12T12:48:43Z"
id: 735356
url: "https://rubyol.iteye.com/blog/735356"
---

今天用命令svnadmin create /var/svn/demo创建了一个仓库，提交文件时，报下面的错误：

 

```
Can't open file 'svn/db/txn-current-locks':permission denied
```

 

查看了半天，最后终于发现了问题，原来，一不留神，使用了root用户，造成了访问权限的问题。

清楚了原因之后，赶紧行动，执行

 

```
chown svn /var/svn/demo -R
```

 

 命令，修改了整个文件夹的owner属性为svn，再次上传文件，成功！