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

Fix permissions after provisioning #2

Open
mackensen opened this issue Nov 11, 2014 · 5 comments
Open

Fix permissions after provisioning #2

mackensen opened this issue Nov 11, 2014 · 5 comments
Assignees

Comments

@mackensen
Copy link
Owner

Following a full provisioning run there are a couple non-ideal situations:

  • Parts of /home/vagrant are owned root:root, which prevents composer from using the oauth token as the vagrant user
  • Although there's an ACL for vagrant on /var/www/moodle/htdocs, effective permissions wind up being a no-op so you can't reinitialize behat. Apache doesn't need write so owning everything vagrant:vagrant might fix it
@mackensen mackensen self-assigned this Nov 11, 2014
@chadmazilly
Copy link

Hello @mackensen love the vagrantfile here, it has really us here at LSU begin the process of integrating Behat testing into our workflow. Based on my previous experiences using Vagrant (outside of Moodle development), I prefer to sync the main project folder (in this case 'htdocs') with my host machine so that I can use IDEs other than Vim to edit files.

I tried to do this by adding this line within the Vagrantfile:

config.vm.synced_folder "./moodle/", "/var/www/moodle/htdocs", create: true, owner: 'vagrant', :mount_options => ["dmode=777", "fmode=777"]

But when I do this it breaks everything. I'm assuming this is because of permissions errors. I see that you are dealing with a slightly similar situation with this issue you have identified. Do you have any suggestions as to how I can sync the htdocs to my host machine and everything work fine?

Again, thanks for this package, it has really helped speed up behat config.

-Chad

@mackensen
Copy link
Owner Author

@chadmazilly thanks, I'm glad you find it useful! I've pushed up a5d6585 which seems to resolve the issue (and incorporates the synced folder by default since that's a good idea). Could you give it a try and let me know?

@chadmazilly
Copy link

Thanks for the quick response! I'm going to test it out tomorrow and will report back.

@chadmazilly
Copy link

Hi @mackensen although that seemed to be a move in the right direction for syncing folders, I am now getting an error when provisioning, specifically at time of execution of the Moodle Behat configuration manifest:

Error: php admin/tool/behat/cli/init.php returned 255 instead of one of [0]
==> default: Error: /Stage[main]/Moodle::Behat/Exec[configure_behat]/returns: change from notrun to 0 failed: php admin/tool/behat/cli/init.php returned 255 instead of one of [0]

After this happens, a number of tasks seem to fail (configure_phpunit, npm stuff, etc.) due to a dependency failure referencing "configure_behat". It does dump you out quickly after with the moodle installation working and accessible.

Are you experiencing the same thing here? I'm going to play around with it for a bit and see if I can help in any way.

@mackensen
Copy link
Owner Author

Strange; it provisioned cleanly for me. Can you enable the puppet debug mode and re-run the provisioner?

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

No branches or pull requests

2 participants