2013-02-27 59 views
1

我試圖設置一個測試實驗室,我可以使用證書進行身份驗證。我使用的是debian squeeze,glasfish和openssl。OpenSSL無法將證書添加到數據庫

我做了一個客戶端證書,並嘗試將其存儲在數據庫中的後,我得到一個錯誤:

1 out of 1 certificate request certified, commit? [y/n]y

write out database with 1 new entries

unable to rename ./demoCA/index.txt to ./demoCA/index.txt.old

reason: is a directory

當我使自簽名CA證書工作正常,但現在它不會工作。 Maby由於在互聯網上找不到任何關於Maby的信息,我很想念它。所以在解決這個問題上的任何指導都將非常感激。

問候 馬裏

+0

看起來文件'。/ demoCA/index.txt'有問題。你可以在'。/ demoCA /'上運行ls -al嗎? – placeybordeaux 2013-02-27 16:17:49

+0

是的,它顯示demoCA中的所有文件 – LadyBug 2013-02-27 16:50:21

+0

你可以發佈輸出嗎? – placeybordeaux 2013-02-27 16:58:32

回答

1

基於關閉您ls -al

total 44 drwxr-xr-x 4 root root 4096 Feb 27 16:30 . 
drwxr-xr-x 5 root root 4096 Feb 27 16:25 .. 
-rw-r--r-- 1 root root 3 Feb 27 12:39 crlnumber 
-rw-r--r-- 1 root root 52 Feb 27 14:30 index.txt 
-rw-r--r-- 1 root root 21 Feb 27 16:30 index.txt.attr 
-rw-r--r-- 1 root root 20 Feb 27 16:30 index.txt.attr.new 
-rw-r--r-- 1 root root 110 Feb 27 16:30 index.txt.new 
drwxr-xr-x 2 root root 4096 Feb 27 12:38 index.txt.old 
drwxr-xr-x 2 root root 4096 Feb 27 16:30 newcerts 
-rw-r--r-- 1 root root 3 Feb 27 16:30 serial -rw-r--r-- 
1 root root 3 Feb 27 16:16 serial.old 

index.txt.old的其實是一個目錄。你可以告訴因爲drwxr-xr-x中的d。我不知道你正在使用的所有東西,但你可以嘗試支持這個mv index.txt.old index.txt.old.backup,然後它應該正常運行。

+0

獲取消息:mv:can not stat'index.txt.old':沒有這樣的文件或directoty。但是因爲我現在知道問題可能是什麼,我會再google一些,看看我是否有一個解決方案。感謝所有幫助 – LadyBug 2013-02-28 07:43:17

+0

我通過刪除index.txt.old'rm -rf index.txt.old'來解決了這個問題。然後再次創建證書。現在數據庫被更新了。 – LadyBug 2013-02-28 08:59:28

+0

優秀!如果它解決了您的問題,請務必將答案標記爲解決方案。 – placeybordeaux 2013-02-28 16:46:48