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

- Published on Sep 24, 2024

## 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 <foldername> with the next folder you see after _/var/www/forms/forms_ in the error message:

```plaintext
     chown -R 1000:1000 <foldername>
     ```

- If you are using SELinux in your environment, run the following command, as well:

```plaintext
     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.
