Permission denied: ‘/var/www/forms/forms/*’

Prev Next

Issue

When trying to perform different tasks, you may see error messages indicating that permissions are denied for a folder within /var/www/forms/forms, which you cannot find on your virtual machine.

Affected versions

All versions

Affected configurations

All configurations

Cause

This issue is caused by an incorrect folder-permissions configuration on the OS of the virtual machine where you have installed Hyperscience. 

The path shown in the error message is not a path that lives on that machine itself, but rather, within one of the containers on the virtual machine. 

This folder is a logical mapping of a local directory to a directory inside the containers.

Solution / Workaround

To correct this problem, you have to first find the folder in question.

  1. To determine where this folder resides locally on the virtual machine, review your “.env” file to determine what your HS_PATH is defined as. The default value is /mnt/hs.

  2. After you’ve found your HS_PATH, you can find the folder where the issue lies.  For example, /var/www/forms/forms/media would translate to /mnt/hs/media if you were using the default HS_PATH.

    • You should, at this point, navigate into the HS_PATH and run the following command to correct the permissions on that folder, replacing  with the next folder you see after /var/www/forms/forms in the error message:

      chown -R 1000:1000 <foldername>
    • If you are using SELinux in your environment, run the following command, as well:

      chcon  -t container_file_t <foldername>
  3. At this point, you should be able to successfully complete the task that gave you the error.

If you encounter this issue and this solution does not resolve the issue, please send us the output of the command you were running so that we can see the scope of the error.

Please also include the contents of your “.env” file.