No such file or directory but directory is right t

2019-07-24 10:58发布

问题:

I am doing some crypto testing with openssl on ubuntu 12.04 and I have a directory build with the following specs:

$home/   
  demoCA/
    certs
    index.txt
    serial
    openssl.cnf
    newcerts/
    crl/

And everytime I run a command, specifically this:

openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config openssl.cnf

it tells me:

I am unable to access the ./demoCA/newcerts directory

./demoCA/newcerts: No such file or directory

There are a few commands I run before this to set it up and I'd be glad to outline them if that would be helpful but I have no idea why it won't find that one directory. Any suggestions?

This is the lab I am running along with this.

回答1:

The reason why no such file or directory does not exist is because you are trying to access

demoCA

not

democa

Linux treats file directories as unique when they have different values -especially when they are lowercase or uppercase.



回答2:

its simple just make another directory demoCA inside the demoCA folder and put files in the directory demoCA

$home/

demoCA/

demoCA

certs
index.txt
serial
crl

it will work fine....you have to put these files inside folder named demoCA otherwise it will not find it.