Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy-RSA failed to create temporary file #482

Closed
grillgamesh opened this issue Feb 22, 2022 · 19 comments
Closed

Easy-RSA failed to create temporary file #482

grillgamesh opened this issue Feb 22, 2022 · 19 comments

Comments

@grillgamesh
Copy link

grillgamesh commented Feb 22, 2022

image

It fails on install, using latest version of everything, and up to date windows install.

@TinCanTech
Copy link
Collaborator

You probably need to be using an administrator account.

@grillgamesh
Copy link
Author

EDIT: It turns out its a permissions error as C:\Program Files\OpenVPN\ is unable to be edited unless you grant 'user' the permissions to modify and edit the folder

@TinCanTech yeah, I tried using the Administrator account, this was the only way.

@TinCanTech
Copy link
Collaborator

The error with the temporary folder does need to be addressed.

Because you are running windows, I invite you to help us test some changes that are being made.

@grillgamesh
Copy link
Author

Sure, I'd be glad to help test this out. BTW this is also happening:
image

@amoncer
Copy link

amoncer commented Apr 4, 2023

Hi i'm facing the same issue, is there any solution ? (windows 11)

Thanks

easyrsa_error

@grillgamesh
Copy link
Author

grillgamesh commented Apr 4, 2023

@amoncer
The short answer is, no.

The long answer, is that I had to re-image my machine, and uninstall some wack windows feature update in order to get it to work.
This was several months ago though, so I don't remember which feature update had to be uninstalled.

More information is also available in Issue 483

@TinCanTech
Copy link
Collaborator

If this is a problem with easyrsa then it can be reopened.

I do not have access to Windows 11 so I cannot test, however, there is probably a simple work around:

  • Copy C:\Program Files\Openvpn\easy-rsa to your user home directory and run it from there, where permissions should not be an issue.
  • Also, take note: If your PKI is C:\Program Files\Openvpn\easy-rsa\pki then your private ca.key (The corner stone of security for your entire PKI) is World readable. Running easyrsa from your home directory is more secure.

@TinCanTech TinCanTech reopened this Apr 4, 2023
@kthamel
Copy link

kthamel commented Apr 13, 2023

I got the same error, re-ran the command as Administrator, and solved it.

@TinCanTech
Copy link
Collaborator

TinCanTech commented Apr 13, 2023

@kthamel All programs that write data to Windows System Folders require administrator privileges, This is not a bug in EasyRSA or any other program.

However, storing your Easy-RSA PKI in Windows System Folders is insecure, because these folders are World Readable, by default.

In future, Easyrsa may even prohibit the use of Windows System Folders, in favor of Windows User Folders, which are only readable by the User or privileged user accounts.

I strongly suggest that you copy \easy-rsa to your $HOME folder and create your PKI there.

Or define your PKI with command line option:

  • --pki-dir="C:/Users/<Your-user-name>/easy-rsa/pki"

@nicky1038
Copy link

nicky1038 commented Oct 7, 2023

However, storing your Easy-RSA PKI in Windows System Folders is insecure, because these folders are World Readable, by default.

@TinCanTech Hello there! Could you please explain more verbose what does "World Readable" mean and why is it so?

At first glance at this phrase there becomes an impression that anyone from the net can read the folder?

@TinCanTech
Copy link
Collaborator

TinCanTech commented Oct 7, 2023

@nicky1038

At first glance

Is your issue with my comment above or the easyrsa code ?

@nicky1038
Copy link

nicky1038 commented Oct 7, 2023

At first glance

Is your issue with my comment above or the code ?

My question is regarding the information in your comment stating that storing PKI inside the OpenVPN installation folder in Program Files is insecure. Sorry for ambiguity

@TinCanTech
Copy link
Collaborator

storing PKI inside the OpenVPN installation folder in Program Files is insecure

It is less than optimal.

@nicky1038
Copy link

storing PKI inside the OpenVPN installation folder in Program Files is insecure

It is less than optimal.

I agree it is not optimal, but you stated that it's World Readable and added the same information message to EasyRSA.
Could you please tell more about what "World Readable" means and why is it so?

@TinCanTech
Copy link
Collaborator

I could disable the warning.

Considering the minority that this may effect, I'm still good with it.

Operating system security is a separate challenge.

@ecrist
Copy link
Member

ecrist commented Oct 7, 2023 via email

@TinCanTech
Copy link
Collaborator

I will disable[patch] that message.

@nicky1038
Copy link

nicky1038 commented Oct 8, 2023

@TinCanTech I have to apologize, I didn't know the term "World readable" before and didn't find something about it on the Internet before asking my question here.

Now I understand the idea. It is actually a good point to log the message with recommendations to move pki to some user folder.

The only thing that could be optionally done is to make the explanation a bit clearer for people like me 😅 At least to change "World readable" to "Readable by other OS users"

@TinCanTech
Copy link
Collaborator

Disabled the warning via #1033

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants