配置svn+apache服务器时,在导入或提交时,如果是unix、linux、mac os x等系统可能遇到类似这样的权限问题:
写道
svn: 提交失败(细节如下):
svn: Can't open file '/Code/SVN/repos/db/txn-current-lock': Permission denied
svn: Can't open file '/Code/SVN/repos/db/txn-current-lock': Permission denied
或者
写道
svn: 提交失败(细节如下):
svn: Can't create directory '/Code/SVN/repos/db/transactions/1-2.txn': Permission denied
svn: Can't create directory '/Code/SVN/repos/db/transactions/1-2.txn': Permission denied
这个主要原因:在svnadmin create时是root身份,所以,mod_dav_svn就没有write权限等。
解决办法:
写道
sudo chown -R daemon /Code/SVN/repos
sudo chmod -R 755 /Code/SVN/repos
sudo chmod -R 755 /Code/SVN/repos
再试就ok~
You might not have write permission on the directory
sudo chown -R $(id -u):$(id -g) MyDirectory
chmod -R u+w MyDirectory