-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Unable to use symlinks as value for CERT_FILE/KEY_FILE settings #11406
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
Comments
Yup it appears the Seriously just what is the point of having helpers that don't a) Tell you how they're going to fail b) Don't do the obvious thing of following the damned symlink. This is incorect see: https://play.golang.org/p/16wpSjLjT7X |
The error message with |
The logging is already improved on master if you read the code again. |
Actually it looks like that permission denied is coming directly from the err that is returned from ioutil.ReadFile... |
I'm sure there is a function to read file attributes to check link/regular-file. As an example there is Readlink |
Great there are 20 cases of ioutil.ReadFile. |
See: https://play.golang.org/p/16wpSjLjT7X ioutil.ReadFile works perfectly fine with symlinks. The problem is genuinely a permissions problem. |
Two things:
|
I have a folder structure prepared and supported by script
All permissions are correct and nginx is fine with them (just as an example) and it is using the same symlinks. Again - I'm Ok to stay with direct paths to files. You or I can close the issue. |
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
Uh oh!
There was an error while loading. Please reload this page.
[x]
):Description
The server has the settings to use HTTPS:
The
fullchain.pem
is a link to the file/etc/letsencrypt/archive/<My Path>/fullchain3.pem
The
privkey.pem
is a link to the file/etc/letsencrypt/archive/<My Path>/privkey3.pem
I have got an error:
server.go:107:ListenAndServeTLS() [E] Failed to load https cert file /etc/letsencrypt/live/<My Path>/fullchain.pem for tcp:0.0.0.0:3000: open /etc/letsencrypt/live/<My Path>/fullchain.pem: permission denied
In fact permissions are correct:
Case 1: Error. I have an error "... permission denied."
CERT_FILE = /etc/letsencrypt/live/<My Path>/fullchain.pem
CERT_FILE = /etc/letsencrypt/live/<My Path>/privkey.pem
Case 2: Success. No errors and everything is fine.
CERT_FILE = /etc/letsencrypt/archive/<My Path>/fullchain3.pem
CERT_FILE = /etc/letsencrypt/archive/<My Path>/privkey3.pem
Imo the call ioutil.ReadFile(certFile) is unable to read the symlinks.
The text was updated successfully, but these errors were encountered: