Re: Folder ownership on NFS Shares (501:dialout)

9,115 views
Skip to first unread message

Igor Serebryany

unread,
Jun 11, 2013, 5:10:41 PM6/11/13
to vagra...@googlegroups.com

The workaround you're looking for is vagrant-bindfs: https://github.com/folken-laeneck/vagrant-bindfs

On Thursday, March 21, 2013 5:33:39 AM UTC-7, Arron Woods wrote:
Hi Paul,

I stumbled upon this post with a similar problem, it appears to be an NFS mounting nuance. I found more information about it here: https://groups.google.com/forum/?fromgroups=#!topic/vagrant-up/-J3UEqYXveA

My vagrant up is failing because the puppet apache virtualhost most tries to chown this directory and can't... got to think of a workaround!

Hope this helps,

Arron

On Wednesday, February 27, 2013 3:29:09 PM UTC, Paul McCrodden wrote:
Hi,

I've a quick question on NFS shares (Mac OSX Mountain Lion)...The NFS share set up in my Vagrantfile changes the ownership UID and GID on the VM share folder to 501:dialout. I cannot seem to map folder ownership correctly. I have used cat /etc/passwd and taken the UID and GID on the VM that owns the folder in question and mapped it using config.vm.share_folder("aegir2", "/var/aegir", "/Users/mccrodp/vagrant", :nfs => true, :map_uid => 106, :map_gid => 109) but no joy....

I can neither create a file with my desired ownership from the Mac mounted share nor change permissions...

Thanks for any help on this,
Paul.

Andrey Miroshnichenko

unread,
Jul 9, 2013, 11:24:53 AM7/9/13
to vagra...@googlegroups.com
bindfs uses fuse. it adds additional delays.
E.g.: my website using raw nfs loads in 500ms. While using bindfs - it takes 1.5 + seconds.

Ben Hirsch

unread,
Dec 8, 2013, 12:50:04 PM12/8/13
to vagra...@googlegroups.com
On OSX Mavericks if you do chown root:0 on the host shared folder and then reprovision with vagrant reload --provision it fixes this, for me.

Rob Davis

unread,
Apr 6, 2017, 7:46:35 AM4/6/17
to Vagrant
Some additional tips needed if you encounter further errors after doing chown root:0 (It all worked out for me in the end - here are my tips)

I tried this and got:

Robs-MacBook-Pro-2:redisvmadded robdavis$ vagrant reload --provision
/opt/vagrant/embedded/lib/ruby/2.2.0/fileutils.rb:816:in `initialize': Permission denied @ rb_sysopen - /Users/robdavis/dev/redisvmadded/puphpet/files/dot/ssh/id_rsa (Errno::EACCES)
from /opt/vagrant/embedded/lib/ruby/2.2.0/fileutils.rb:816:in `open'
from /opt/vagrant/embedded/lib/ruby/2.2.0/fileutils.rb:816:in `compare_file'
from (eval):418:in `block (3 levels) in <top (required)>'
from /opt/vagrant/embedded/gems/gems/vagrant-1.8.6/lib/vagrant/config/v2/loader.rb:37:in `call'

etc etc.

which was a new error I had not seen before.

To resolve this, I did:

cd enclosing_folder_where_you_run_vagrantup/files/dot/ssh/

chmod 666 *

sudo chown your_user_name *

sudo chmod -R u+rw,g+rw,o+rw enclosing_folder_where_you_run_vagrantup

I did all this because composer update was failing in my VM with an error about not being able to delete .php files. It was related to permissions on the host OS that shares the files with the VM. Specifically the problem I did have was:

Patching is disabled. Skipping.

  - Updating drupal/core (8.2.4 => 8.2.7)    Update failed (Could not delete web/core/lib/Drupal/Core/State/State.php: )

    Would you like to try reinstalling the package instead [yes]? yes

  - Removing drupal/core (8.2.4)

Rob Davis

unread,
Apr 6, 2017, 7:54:00 AM4/6/17
to Vagrant
P.S. - I first did a sudo chown -R root:0 enclosing_folder_where_you_run_vagrantup

My subsequent steps to resolve the errors follow on from this.
Reply all
Reply to author
Forward
0 new messages