Sha256: c2d9cd1ffa666bc7352f843cee93bd74bb47f32c9614c96ebe78f23e4e460fd5

Contents?: true

Size: 1.91 KB

Versions: 15

Compression:

Stored size: 1.91 KB

Contents

---
title: "Standalone Permissions"
nav_text: Permissions
category: standalone-details
---

The kubes standalone installer will make sure that the owner and permissions of the `/opt/kubes` folder is your user.

If the `/opt/kubes` folder is not owned by your user for whatever reason, here are the commands to change it:

For macosx:

    sudo chown -R `whoami`:staff /opt/kubes

For other Linux OSes, this is generally:

    sudo chown -R `whoami`:`whoami` /opt/kubes

## Why?

When the `/opt/kubes` folder is not owned by your user, you won't be able to write to it without sudo. This results in a sudo prompt when kubes calls `bundle` and tries to install new gems. You will see this:

    => Installing dependencies with: bundle install
    Following files may not be writable, so sudo is needed:
      /opt/kubes/embedded/bin
      /opt/kubes/embedded/lib/ruby/gems/2.7.0
      /opt/kubes/embedded/lib/ruby/gems/2.7.0/cache
      /opt/kubes/embedded/lib/ruby/gems/2.7.0/extensions
      /opt/kubes/embedded/lib/ruby/gems/2.7.0/gems
      /opt/kubes/embedded/lib/ruby/gems/2.7.0/specifications

    Your user account isn't allowed to install to the system RubyGems.
      You can cancel this installation and run:

          bundle install --path vendor/bundle

      to install the gems into ./vendor/bundle/, or you can enter your password
      and install the bundled gems to RubyGems using sudo.

      Password:

To fix this issue, make sure `/opt/kubes` is owned by your user, instead of repeatedly having to type your password for sudo.

Also, running `sudo` means you're using bare shell with pretty much none of your environment settings or variables configured. Though there are ways to [preserve](https://stackoverflow.com/questions/8633461/how-to-keep-environment-variables-when-using-sudo) environment variables with `--preserve-env`, it's often better to avoid sudo as you'll run into different environmental differences and quirks.

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
kubes-0.9.3 docs/_docs/install/standalone/details/permissions.md
kubes-0.9.2 docs/_docs/install/standalone/details/permissions.md
kubes-0.9.1 docs/_docs/install/standalone/details/permissions.md
kubes-0.9.0 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.10 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.9 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.8 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.7 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.6 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.5 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.4 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.3 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.2 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.1 docs/_docs/install/standalone/details/permissions.md
kubes-0.8.0 docs/_docs/install/standalone/details/permissions.md