Issue with installing certificate ("command not found")

I’m running into an issue when I try to install LE’s certificate, based on the instructions in the “Getting Started” section.

When I input the “$ sudo yum install epel-release” command, the client returns the following output:

-jailshell: line 31: $: command not found”

The same happens when I try to input “$ ./certbot-auto”.

I am using a shared web hosting plan, with jailed SSH access, which is restricted to my own account (not sure whether this means I have root shell or not). It’s an Apache server with CentOS6. Accessing it using WinSCP.

Any help would be greatly appreciated.

$ at the start of a line is typically used to indicate that the following text is a shell command. It’s a documentation convention, not part of the actual command.

More specifically, $ indicates a unprivileged shell command (i.e. one that does not require root as such), while # usually indicates “this should be run as root/sudo”. That being said, I wouldn’t rely on that too much, as this is not always applied consistently across all documentation you might encounter.

I want to learn command coding - can you recommend a source(s) where I can learn more?
Thank you.:slight_smile:

I tried running "sudo yum install epel-release" without $ at the start of the line, and I then get the following output:

sudo: effective uid is not 0, is sudo installed setuid root?

When I try running it with a # at the beginning of the line, it juts attempts to load something (e.g. the cursor changes to a loading sign), and nothing happens (I had to use task manager in order to exit the program after several minutes).

A file named "certbot-auto" did appear in the home directory for the site, but when I try to input the command:

./path/to/certbot-auto --apache

I get the output:

-jailshell: line 8: ./path/to/certbot-auto: No such file or directory

When I try it with a $ at the beginning I again get the "command not found" output, and when I try with # it also gets stuck attempting to load something.

In addition, when I now try to input:

./certbot-auto

I get the output:

./certbot-auto: Permission denied

Sorry, I missed the bit where you said this is a shared web hosting plan. Based on the output of sudo, it would seem you don’t have root access (that’s expected for shared hosting), which is required for certbot-auto to work.

There are a number of other clients that don’t have many requirements and could work without root, such as the bash clients. The process of installing the certificate in your web server would depend on your hosting provider - typically there’s a control panel where you can provide the certificate and key, at least if SSL is supported at all - but the client won’t be able to automate that for you.

Alternatively, if switching your hosting provider is an option, you might want to look at the list of web hosting providers with Let’s Encrypt support.

1 Like

For further reference, both the # and the ./path/to/certbot-auto are also documentation conventions. The # is a typical prompt from a Unix shell that’s running as root, so when you see a command in documentation that begins with #, it means to run the command as root (which is what @pfg was saying).

The ./path/to/certbot-auto doesn’t mean to literally type in “./path/to”, but rather means that you should determine exactly where in the directory hierarchy the file certbot-auto is, and then provide the directory path to that location (for example, it could be something like /home/knickknack/certbot-auto or any other location depending on where the file certbot-auto was downloaded).

I agree with @pfg’s observation that you may not have root access (particularly, the error message that you saw when running sudo makes me think that the system administrator intended to prevent you from using it!), so it may be hard for you to use Certbot automatically, and you might want to try a different client application, or a different hosting provider, or ask the hosting provider to help integrate support for Let’s Encrypt certificates automatically as part of its service.

1 Like

@schoen and @pfg:

Thank you both for the explanations, they were very helpful. It appears that you were right, and it is not feasible to implement LE with my current hosting provider, so I’ll look into alternatives.

Hello @VDecalS,

This is off topic but a good guide to learn bash is BashGuide from Greg’s Wiki

Cheers,
sahsanu

Hello @sahsanu,
I didn’t know what coding I was looking for. I got sidetracked into making my websites responsive with Bootstrap. Thank you very much for the information!
HAGD,
VDecalS

@VDecalS, I think there’s a lot of nice stuff in the FLOSS Manuals book about the command line (which is at https://flossmanuals.net/command-line/ – ironically, their certificate is expired right now). A version of this book was also published by the GNU Press.

I have written a related book which I never published. If you’d like to send me an e-mail address via PM, I could also share a copy with you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.