Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update readme with file permissions recommendations #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,30 @@ Symbiote\SteamedClams\ClamAVScanJob:
time: '02:00:00'
```

## File Permissions

In order to scan a file on upload, the `clamav` user (or equivalent) will need to have
permission to read the files in the `public/assets/.protected` directory. If this fails
to read the file, the default behaviour is for the file to be rejected as "infected"
with an "ACCESS DENIED" error.

A typical linux setup would have permissions on these files something similar to:
`www-data www-data rw-------`, which means that only the `www-data` user can read those
files. If you have a setup where a `clamav` user is in the `www-data` group, you'll need
the following configuration to update the permissions:

```yml
SilverStripe\Assets\Flysystem\AssetAdapter:
file_permissions:
file:
public: 0664
private: 0660
dir:
public: 0775
private: 0770
```


# Install on existing project

By running the task below, all files uploaded before installation of the module will be
Expand Down