Skatteetaten / vagrant-hashistack

Vagrant box with the complete hashistack. Use for demo and development.
Apache License 2.0
25 stars 9 forks source link

Directory has wrong permissions in 0.10 #477

Closed oschistad closed 3 years ago

oschistad commented 3 years ago

Current behaviour

after starting vagrant box, 'vagrant ssh' to start an interactive shell, and then as user 'vagrant' try to run any hashicorp command:

vagrant@vagrant:~$ consul
-bash: consul: command not found
vagrant@vagrant:~$ vault
-bash: vault: command not found
vagrant@vagrant:~$ nomad
-bash: nomad: command not found

On inspecting the state of /usr/local/bin/oss:

vagrant@vagrant:~$ ls -al /usr/local/bin/oss
ls: cannot access '/usr/local/bin/oss/consul': Permission denied
ls: cannot access '/usr/local/bin/oss/packer': Permission denied
ls: cannot access '/usr/local/bin/oss/terraform': Permission denied
ls: cannot access '/usr/local/bin/oss/nomad': Permission denied
ls: cannot access '/usr/local/bin/oss/vault': Permission denied
ls: cannot access '/usr/local/bin/oss/consul-template': Permission denied
ls: cannot access '/usr/local/bin/oss/..': Permission denied
ls: cannot access '/usr/local/bin/oss/.': Permission denied
total 0
d????????? ? ? ? ?            ? .
d????????? ? ? ? ?            ? ..
-????????? ? ? ? ?            ? consul
-????????? ? ? ? ?            ? consul-template
-????????? ? ? ? ?            ? nomad
-????????? ? ? ? ?            ? packer
-????????? ? ? ? ?            ? terraform
-????????? ? ? ? ?            ? vault

This behaviour is weird but is caused by incorrect permissions on folder /usr/local/bin/oss, which is set to 0744 - eg, no execute for non-owner.

Expected behaviour

/usr/local/bin/oss has permissions 0755.

How to reproduce?

Suggestion(s)/solution(s) [Optional]

Checklist (after created issue)

fredrikhgrelland commented 3 years ago

@oschistad Nice catch! Patch incoming