我被這個任務困住了。svn post-commit hook沒有權限在工作副本目錄中創建文件
我寫了svn後提交鉤子,應該更新服務器上的工作副本,如果事情發生了變化。但似乎它沒有該文件夾的權限,但我已經設置它們允許每個人都在那裏寫和讀。
因此,這裏的測試腳本:
#!/bin/sh
REPOS="$1"
REV="$2"
DIR="/root/root/trunk"
touch $DIR/worked
我已經得到了輸出:
Committed revision 51.
Warning: 'post-commit' hook failed with error output:
touch: cannot touch `/root/root/trunk/worked': Permission denied
而對目標文件夾的權限:
[[email protected] trunk]# ls -la
total 24
drwxrwxrwx 5 apache apache 4096 Jul 26 07:08 .
drwxrwxrwx 6 apache apache 4096 Jul 24 02:14 ..
-rwxrwxrwx 1 apache apache 1367 Jul 24 02:45 pom.xml
drwxrwxrwx 4 apache apache 4096 Jul 24 02:23 src
drwxrwxrwx 6 apache apache 4096 Jul 24 13:31 .svn
drwxrwxrwx 7 apache apache 4096 Jul 24 11:18 target
任何想法?
因爲它是在那裏創建的。是否有意義? – glaz666 2009-07-26 13:33:33
謝謝,這是有效的。仍然不明白爲什麼它的所有權限設置的根目錄子目錄失敗 – glaz666 2009-07-26 19:13:38
如果Apache甚至沒有對/ root的讀取權限,那麼它如何知道「/ root/root/trunk/worked」存在,因爲找到該目錄存在將需要閱讀它。 – Ryu 2009-07-26 20:12:03