Skip to content
Advertisement

Vagrant and virtualbox synced directory: permission issues moving from windows host to linux host

I’m currently using vagrant to provision a Linux (CentOS) guest for deploying a web app running on Websphere. The host environment is Windows 7, but I’d like to move to Linux (Arch) for further development.

The virtual machine is running via VirtualBox and Vagrant provides it with a synced directory (vboxsf) containing the development project files/directories. On the Windows host, calling “vagrant up” works without a hitch. However, on the Linux host, where nothing has changed except for the host OS, Websphere fails to start. Looking at the Websphere logs only gives the following vague error:

ADMU3011E: The server started but failed to initialize

I’ve noticed that when the synced folder gets mounted from the Windows host, the permissions of all the files and directories within it are “rwxrwxrwx”. On the Linux host, they are equivalent to whatever they were on the Linux host. This points to an obvious discrepancy with how the guest interprets permissions when mounting a synced directory from different host OSs. I think this is likely the reason for Websphere not starting correctly.

My question is this: When switching from a Windows to Linux host, what Vagrant/VirtualBox configuration would need to change in order for the guest to treat the synced directory in the same manner?

Advertisement

Answer

Just use mount_options https://www.vagrantup.com/docs/synced-folders/basic_usage.html#mount_options

Here you have an example how to do this. http://jeremykendall.net/2013/08/09/vagrant-synced-folders-permissions/

Another way is to run your Websphere server as vagrant user so it will have full permissions to anything you mount as it’s owner.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement