0

I am trying to install Magento2.4 Open source on the following setup.

VirtualBox 6.1 installed on Windows 10

Nginx server installed on the VirtualBox

Ubuntu 20.4 Server installed on the Virtualbox

Php 7.3.20

To make the Windows folder shared on the VirtualBox Ubuntu 20.04 Server, I used following process.

Reference: https://stackoverflow.com/a/54348495/1616003

1) sudo apt-get update

sudo apt-get install virtualbox-guest-dkms

sudo apt-get install virtualbox-guest-utils
  1. Reboot the Virtual Machine

  2. Make this shared folder auto mounted

    mount -t vboxsf magento2_vm_folder /var/www/html

    echo "sudo mount -t vboxsf magento2_vm_folder /var/www/html" >> /home/mukesh/.profile

  3. sudo visudo

    mukesh ALL = (ALL) NOPASSWD: /bin/mount

The Windows folder is now accessible in the VirtualBox's Ubuntu server's /var/www/html

Now I am trying to install Magento2.4 in the /var/www/html directory. To do it I run following command

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition .

I get following error

Plugin installation failed (include(/var/www/html/qa.magento.com/vendor/magento/magento-composer-installer/src/MagentoHackathon/Composer/Magento/Plugin.php): failed to open stream: No such file or directory), rolling back

Note: When I perform all the above mentioned steps in Ubuntu Server 18.04 then everything works fine. It seems some permission issue.

So could some one help me understand if something has changed in the Ubuntu Server 20.04.

Even if I give 777 permission on /var/www/html folder the error remains.

0

My guess is that some folder under "/var/www/html/" does not have the 777 permission.

There are two ways of solving this, one by adding nginx to the vboxsf and the other by using mount options.

vboxsf group:

usermod -aG vboxsf nginx

Using /etc/fstab options:

magento2_vm_folder    /var/www/html     vboxsf    defaults,uid=<nginx uid>,gid=<nginx gid>,umask=0022    0    0

EDIT: If you're using PHP in FPM mode, you may need to substitute the nginx user for the PHP FPM user's info.

| improve this answer | |
  • @Brain Turek How do it get <nginx gid> values? – Mukesh Aug 24 at 15:30
  • For UID: id -u <username> (I'm not sure if it's "nginx" or "www-data") For GID: id -g username – Brian Turek Aug 24 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.