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

[FEATURE] Update docs/makefile for command not found after make install #1185

Open
Kern-- opened this issue Apr 16, 2024 · 2 comments
Open
Labels
feature New feature or request

Comments

@Kern--
Copy link
Contributor

Kern-- commented Apr 16, 2024

Description

By default, make install installs SOCI binaries into /usr/local/bin. This can be overriden by setting CMD_DESTDIR when running make install.

On some distros, usr/local/bin isn't part of the default secure_path in the sudoers file and so the commands docs (e.g. Build.md), don't work:

sudo soci --help

gives: command not found: soci.

We should update either the makefile or the docs to point people in the right direction.

Describe the solution you'd like

I think this could use some discussion, but the options that I think are available are:

  1. Use absolute paths in the docs (/usr/local/bin/soci --help)
  2. Set alias soci=sudo /usr/local/bin/soci and use non-sudo commands throughtout
  3. Add a debug note to use either some form of sudo env PATH=$PATH or edit secure path with sudo visudo
  4. Choose some other location to install by default (/bin? /usr/bin?)

Describe any alternative solutions/features you've considered

No response

Any additional context or information about the feature request

No response

@Kern-- Kern-- added the feature New feature or request label Apr 16, 2024
@pendo324
Copy link
Contributor

pendo324 commented Apr 16, 2024

I think this could use some discussion, but the options that I think are available are:

1. Add a debug note to use either some form of `sudo env PATH=$PATH`  or edit secure path with `sudo visudo`

2. Choose some other location to install by default (`/bin`? `/usr/bin`?)

I personal lean towards option 1 because it seems that convention is to put unpackaged binaries into /usr/local/bin.

The docs could also be changed to say "run sudo /usr/local/bin/soci" instead of just "run sudo soci". And then a note on how to not have to deal with that (the sudo env command, or an alias e.g. alias soci=sudo /usr/local/bin/soci, or your path propagation).

sudo path propagation (or even more permanent visudo PATH editing) has similar risks as just putting it in a "default" root PATH, if your goal is to just make it harder for a "bad" binary to be run with elevated privs.

@Kern--
Copy link
Contributor Author

Kern-- commented Apr 16, 2024

I like the idea of recommending an alias and then using non-sudo commands throughout. That would make the docs the same if we have rootless setup in the future too.

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

No branches or pull requests

2 participants