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

Remove 'sudo' prefix from helpful message about fetching logs #248

Merged
merged 1 commit into from
Jan 9, 2018

Conversation

donatello
Copy link
Member

  • Whether sudo is required or not is related to the docker setup on
    the user's machine, and not related to the docker command used to
    retrieve the logs itself.

- Whether sudo is required or not is related to the docker setup on
  the user's machine, and not related to the docker command used to
  retrieve the logs itself.
Copy link
Member

@harshavardhana harshavardhana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://docs.docker.com/get-started/#setup

Note: You may need to add your user to the docker group in order to call this command without sudo. Read more

Looks like the docker docs now officially support adding docker as user.

Copy link
Member

@balamurugana balamurugana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no harm to add sudo even if its running as privileged user. Most of the time, current user is not added to docker user. Current approach is safe for copy/paste.

@donatello
Copy link
Member Author

There is no harm to add sudo even if its running as privileged user.

Using sudo is not good practice. Any program that is known to be safe can be run as root, but this is discouraged for all the usual reasons (encourages users to solve permission issues by simply running as root).

Most of the time, current user is not added to docker user.

This was true in the early days - the support to run docker without root has been around for more than 2 years by now. The default Ubuntu/Linux install instructions for Docker specify how to run docker without root.

Current approach is safe for copy/paste.

This is irrelevant. I think what you meant is that it is convenient. However, no convenience is lost if the user just did the post install steps - https://docs.docker.com/engine/installation/linux/linux-postinstall/

@balamurugana
Copy link
Member

balamurugana commented Jan 3, 2018

Using sudo is not good practice. Any program that is known to be safe can be run as root, but this is discouraged for all the usual reasons (encourages users to solve permission issues by simply running as root).

Direct root account usage is disabled long time ago. See https://help.ubuntu.com/community/RootSudo

This was true in the early days - the support to run docker without root has been around for more than 2 years by now. The default Ubuntu/Linux install instructions for Docker specify how to run docker without root.

Current approach is safe for copy/paste.

This is irrelevant. I think what you meant is that it is convenient. However, no convenience is lost if the user just did the post install steps - https://docs.docker.com/engine/installation/linux/linux-postinstall/

Note that ubuntu doesn't add any user into docker group by default. Steps https://docs.docker.com/engine/installation/linux/linux-postinstall/ is done separately after sudo apt install docker-ce and users in docker group know to eliminate sudo and interesting warning in the link is

Warning: The docker group grants privileges equivalent to the root user. For details on how this impacts security in your system, see Docker Daemon Attack Surface.

@donatello
Copy link
Member Author

donatello commented Jan 8, 2018

Direct root account usage is disabled long time ago. See https://help.ubuntu.com/community/RootSudo

I don't understand. This is an unrelated point. I didn't say anything about logging in as root. To clarify my earlier point, a sudo user (e.g. the owner of a laptop with ubuntu installed) can run any program with root privileges by prefixing the command with "sudo". Though it is safe to run many programs as root (again, by prefixing the command with sudo), it is discouraged, as it encourages insecure practices such as solving permissions issues by using the sudo hammer.

Note that ubuntu doesn't add any user into docker group by default. Steps https://docs.docker.com/engine/installation/linux/linux-postinstall/ is done separately after sudo apt install docker-ce and users in docker group know to eliminate sudo and interesting warning in the link is
Warning: The docker group grants privileges equivalent to the root user. For details on how this impacts security in your system, see Docker Daemon Attack Surface.

Yes, again obviously docker does not do this automatically as it is not inherently safe to run docker with root privileges (by adding it to docker group). This is why it is left to the user to decide their own level of tolerance to run untrusted programs. It is the same with mint. We do not guarantee it is safe - we should not recommend users to run it as root - especially when it is not strictly required.

@kannappanr kannappanr merged commit 23af2a1 into minio:master Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants