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

/vagrant has no permissions for user vagrant #29

Open
ThomasWaldmann opened this issue Aug 1, 2017 · 3 comments
Open

/vagrant has no permissions for user vagrant #29

ThomasWaldmann opened this issue Aug 1, 2017 · 3 comments
Assignees
Labels

Comments

@ThomasWaldmann
Copy link

ThomasWaldmann commented Aug 1, 2017

vm.box = "terrywang/archlinux"

$ vagrant ssh arch64
Last login: Mon Feb  1 12:15:15 2016
vagrant@archlinux:~$ cd /vagrant/
-bash: cd: /vagrant/: Permission denied
@ThomasWaldmann ThomasWaldmann changed the title /vagrant has no permission for user vagrant /vagrant has no permissions for user vagrant Aug 1, 2017
@ThomasWaldmann
Copy link
Author

btw, other than that minor glitch, the box seems really nice to work with - only had to install virtualenv/pip, everything else was already there. :)

@terrywang
Copy link
Owner

Just did a quick test, it works fine here with Vagrant 1.9.7 + VirtualBox 5.1.26.

$ vagrant init terrywang/archlinux

$  vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'terrywang/archlinux' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'terrywang/archlinux'
    default: URL: https://vagrantcloud.com/terrywang/archlinux
==> default: Adding box 'terrywang/archlinux' (v3.17.0719) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/terrywang/boxes/archlinux/versions/3.17.0719/providers/virtualbox.box
==> default: Successfully added box 'terrywang/archlinux' (v3.17.0719) for 'virtualbox'!
==> default: Importing base box 'terrywang/archlinux'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'terrywang/archlinux' is up to date...
==> default: Setting the name of the VM: test_env_default_1501559790300_83206
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2200 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2200
    default: SSH username: vagrant
    default: SSH auth method: private key
    default:
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default:
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if it's present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
==> default: Mounting shared folders...
    default: /vagrant => /private/tmp/test_env

$  vagrant status
Current machine states:

default                   running (virtualbox)

The VM is running. To stop this VM, you can run `vagrant halt` to
shut it down forcefully, or you can run `vagrant suspend` to simply
suspend the virtual machine. In either case, to restart it again,
simply run `vagrant up`.

$  vagrant ssh
Last login: Mon Feb  1 12:15:15 2016
vagrant@archlinux:~$  cd /vagrant/
vagrant@archlinux:/vagrant$ ll
total 8
drwxr-x---  1 vagrant vagrant  136 Aug  1 13:52 ./
drwxr-xr-x 18 root    root    4096 Aug  1 13:56 ../
drwxr-x---  1 vagrant vagrant  102 Jul 28 12:56 .vagrant/
-rw-r-----  1 vagrant vagrant 3026 Aug  1 13:52 Vagrantfile

vagrant@archlinux:/vagrant$  pwd
/vagrant

mode bits are as below, looks good to me...

drwxr-x---   1 vagrant vagrant   136 Aug  1 13:52 vagrant/

Thanks for using the box (and your appreciation), it was created for my own learning and testing purpose, didn't expect it be reused by so many people ;-)

@terrywang terrywang self-assigned this Aug 1, 2017
@ThomasWaldmann
Copy link
Author

I suspect it works for you because you use shared folders and the permissions you see are part of the mounted filesystem. I use rsync for unidirectional sync host -> vm, so there is no fs mounted on /vagrant.

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

No branches or pull requests

2 participants