Virtualbox + Meteor/mongo = File Permission Error


#1

I am developing on Windows 10, but running Meteor 1.4.3 on a VM (Ubuntu), with a Shared Folder between the Win10 Host and Ubuntu Guest.

I prefer running the development build on Linux - is faster and smoother than on Windows.

However when running “meteor run” I get the following error which is due to file permissions. Has anyone dealt with this and know a way round it. Virtualbox automounts the shared drive on to Ubuntu in “/media”, with Owner Root and Group Vboxsf. I have added the ubuntu user to the vboxsf group.

Error :

=> Started proxy.
=> A patch (Meteor 1.4.2.3) for your current release is available!
   Update this project now with 'meteor update --patch'.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Unexpected mongo exit code 100. Restarting.
Can't start Mongo server.
MongoDB had an unspecified uncaught exception.
This can be caused by MongoDB being unable to write to a local database.
Check that you have permissions to write to .meteor/local. MongoDB does
not support filesystems like NFS that do not allow file locking.

Thank You


#2

I think I remember running into this. From what I recall, it has to do with the filesystem which is used for shared folders - it’s not the normal filesystem.

I couldn’t find a way around that, however, I then simply used a network share using Samba.

I added these two lines into /etc/samba/samba.conf as a quick’n’dirty solution:

force user = username
force group = username

to avoid file permission issues due to the owner of new files being none:none or somesuch.

I then created the network share through:

net usershare add share_name /home/user/somefolder "Share description" everyone:F guest_ok=y

I wouldn’t use that solution for anything but a private developer VM, though.


#3

@andyl i highly recommend using Docker for Windows in development instead of using a VM

Regarding your problem… If you run your app on a shared folder then use the internal Meteor Mongo then you will get this error… Try running a different instance of Mongodb then link it to your app in your environment settings…

From what I read and experienced MONGODB can’t run on a shared folder between a windows and linux , as you will always get an error… In fact this is also true even if you will use the recently launched Windows bash