Skip to content
This repository was archived by the owner on Jun 30, 2020. It is now read-only.

vvv-init.sh not executable by default #339

Closed
hlashbrooke opened this issue Feb 16, 2017 · 11 comments
Closed

vvv-init.sh not executable by default #339

hlashbrooke opened this issue Feb 16, 2017 · 11 comments

Comments

@hlashbrooke
Copy link

I have a recent installation of Kubuntu 16.04 on which I installed VVV using the guide from the VVV site. I then installed Variable VVV (as I have done before on my previous machine). Since then I created a new site with vv create just like normal - it made the site, created the folder with the hosts file, init script, etc. and the output in terminal all seemed fine (with my username and all). The problem was that WordPress was not downloaded and the database was not created, so I manually ran vagrant up --provision, but it didn't change anything.

To fix the issue I had to SSH into the Vagrant box using vagrant ssh, and run chmod +x vvv-init.sh in the site's folder in order to get the script to work so that WordPress could be installed. After doing that vagrant up --provision worked as expected (downloaded WP, created the database and set everything up as I had specified).

I created another new site after this as a test and the same thing happened again. Is this a known oddity on Linux? Or perhaps some kind of permissions issue that I wasn't aware of?

Happy to provide any additional info that you may need.

@breadadams
Copy link

I was having this issue too. I recently ran a clean install of Sierra, and since that (plus a fresh install of vagrant, vv, etc.) it's working again.

@zoracon
Copy link

zoracon commented Mar 9, 2017

I am also having this issue with clean installs of everything. I did notice the file structure changed in in the the site folders (they now have public_html, provision, etc). Would that affect the path of the install?

@vitolob
Copy link

vitolob commented Mar 9, 2017

@alexishancock I would recommend you check #340 for a [temporary] solution.

@zoracon
Copy link

zoracon commented Mar 10, 2017

@vitolob Thanks! I went through that process and I still have the same results.

It turns out the vv-init.sh file created by vv create has some curious lines in it. I'm not completely savvy with this kind of scripting but I know it's creating the wrong directory. It doesn't reflect the new directory I see in the other VVV folders at all.

I see these lines:

	echo 'Installing WordPress (trunk) in custom-site/htdocs...'
	if [ ! -d "./htdocs" ]; then
		mkdir ./htdocs
	fi

Then it proceeds to create htdocs folder & installs wordpress into there.

@vitolob
Copy link

vitolob commented Mar 10, 2017

@alexishancock Could you be more specific as to what problem exactly are you having? Which process did you go through?

That part of the script is fine. vv installs WordPress inside the htdocs folder.

bradp added a commit that referenced this issue Mar 11, 2017
@zoracon
Copy link

zoracon commented Mar 13, 2017

@vitolob
Sure, sorry for the confusion.
So with my comment above, I see in the other site folders, the structure they have is the screenshot below:
screenshot 2017-03-13 09 30 39

The "provision" folder I noticed holds these files:
screenshot 2017-03-13 09 32 11

However, when I create a new site and manually run vvv-init.sh, the vvv-hosts, vvv-nginx, as well as the vvv-init.sh files are all in the root of the newly created site folder. Not in the provision folder.

With that said, I also noticed when I ran vvv-init.sh, it created a htdocs directory. Which is not the file structure I see in directories like wordpress-default. The wordpress install now lives in the directory public_html.

These may have nothing to do with my issue, but I just wanted to point out this new file structure that I see that doesn't at all reflect the created sites file structure.

@vitolob
Copy link

vitolob commented Mar 13, 2017

@alexishancock
You can name the WordPress install folder however you want. You don't have to follow the file structure the default installations use.
I wonder if you're still having an issue that I (or somebody else) can help you with, or you have successfully managed to open your new WordPress site?

PS: The new site provisioner in VVV 2 will look for two files vvv-init.sh and vvv-nginx.conf in the provision/ folder. It will also check for them in the root of the site folder for backwards compatibility (So no problems with the vv file structure). Hence, the default installations putting them in the provision/ folder as you mentioned.

@zoracon
Copy link

zoracon commented Mar 13, 2017

@vitolob No unfortunately I haven't been able to run a new site. The install folder for wordpress from vv-create creates an htdocs directory in the root. I didn't know you could name htdocs whatever you'd like. The defaults commands from the vvv-init.sh in the new site creates the htdocs folder, so I thought I shouldn't tamper with that.

@vitolob
Copy link

vitolob commented Mar 13, 2017

@alexishancock
So after you ssh into the machine, execute vvv-init.sh and run sudo service nginx restart, you still get a 404 not found? Even after running vagrant up --provision (on your host machine)?

@zoracon
Copy link

zoracon commented Mar 13, 2017

Okay it turns out I was missing the command sudo service nginx restart. So thank you for confirming my folder structure was not the issue. My site runs now. Thank you so much for walking through this with me.

@bradp
Copy link
Owner

bradp commented Mar 17, 2017

Closing this, I'm going to start tracking 2.0 support in #348.

@bradp bradp closed this as completed Mar 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants